POSIX: replace alarm() with a waiting thread.

Using alarm(2) is very error prone. It's not compatible with certain
implementations of sleep(3) and it's hard to do anything in the handler
because of async-signal safety.

We replace alarm(2) with spawning a thread that will signal the process
after waiting.

Note: this CL only affects a --child-clean-exit codepath.

BUG=341147
NOTRY=true

Review URL: https://codereview.chromium.org/142453003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249647 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249647
Make bookmark app windows group with their launch icon on ChromeOS.

This CL makes bookmark app windows match against their kLaunchWebUrl rather
than their web extent when looking for a shelf icon to associate with on
ChromeOS.

This fixes an issue where bookmark app windows were associated with no
shelf icon and therefore not accessible via the shelf.

BUG=318607

Review URL: https://codereview.chromium.org/150003002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249648 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249648
Add test cases on HandleClickedNotificationDelegate.

BUG=336650
R=dewittj@chromium.org
TEST=new test case

Review URL: https://codereview.chromium.org/151873004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249649 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249649