diff options
author | achuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 19:43:15 +0000 |
---|---|---|
committer | achuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 19:43:15 +0000 |
commit | 460a29493f0b9a65cbd8161c0995bbdcad26f4f3 (patch) | |
tree | 227a6baf0da2c75897481cf1a1682593dc11bb14 /chrome/browser/browser_shutdown.cc | |
parent | b9a9d50012485fe840902738a496e440ead96728 (diff) | |
download | chromium_src-460a29493f0b9a65cbd8161c0995bbdcad26f4f3.zip chromium_src-460a29493f0b9a65cbd8161c0995bbdcad26f4f3.tar.gz chromium_src-460a29493f0b9a65cbd8161c0995bbdcad26f4f3.tar.bz2 |
Upon WrenchMenu SignOut on ChromeOS, respect onbeforeunload/onunload handlers, and ongoing downloads.
Check if beforeunload/unload handlers and ongoing downloads exist. If they do not, signal ChromeOS to halt
immediately, otherwise, shutdown the browser gracefully before shutting down ChromeOS.
BUG=chromium-os:8328,chromium-os:8178
TEST=Go to achuithz600/achuith/test/onunload.html, open wrench menu and sign out. A popup should appear and cancel the signout. Go to achuithz600/achuith/large_files/, download the file, and during the download, ctrl-shift-q. A popup should appear to cancel the signout. If you choose not to cancel, the system should restart without Chrome crashing. If you choose to cancel, ChromeOS should halt the signout process.
Review URL: http://codereview.chromium.org/4833002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69298 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index d115cf5..2ccf5fd 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -45,6 +45,8 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/boot_times_loader.h" +#include "chrome/browser/chromeos/cros/cros_library.h" +#include "chrome/browser/chromeos/cros/login_library.h" #endif using base::Time; @@ -244,6 +246,12 @@ void Shutdown() { } UnregisterURLRequestChromeJob(); + +#if defined(OS_CHROMEOS) + if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { + chromeos::CrosLibrary::Get()->GetLoginLibrary()->StopSession(""); + } +#endif } void ReadLastShutdownFile( |