diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 20:55:45 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-18 20:55:45 +0000 |
commit | 4c793f0298cbafa6826ef1bc2d85d92bf64320ba (patch) | |
tree | 5e6e6a34051417ee4c6847f397713c5d56e99d0d /chrome/browser/background_contents_service.cc | |
parent | 0906270c4485c74cf35fed76aee21458702ce68c (diff) | |
download | chromium_src-4c793f0298cbafa6826ef1bc2d85d92bf64320ba.zip chromium_src-4c793f0298cbafa6826ef1bc2d85d92bf64320ba.tar.gz chromium_src-4c793f0298cbafa6826ef1bc2d85d92bf64320ba.tar.bz2 |
Added BackgroundModeManager which tracks when background apps are loaded/unloaded
and puts Chrome into BackgroundMode appropriately.
Added EXTENSION_UNINSTALLING notification which is sent out when a notification
is about to be uninstalled.
Refactored StatusTray code to move StatusTray under the profile rather than
attaching it to the browser process, and removed StatusTrayManager which is
no longer needed now that BackgroundModeManager handles creating status icons.
BUG=43382
TEST=background_mode_manager_unittests.cc
Review URL: http://codereview.chromium.org/3134011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background_contents_service.cc')
-rw-r--r-- | chrome/browser/background_contents_service.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc index 3202bac..edd3219 100644 --- a/chrome/browser/background_contents_service.cc +++ b/chrome/browser/background_contents_service.cc @@ -40,8 +40,7 @@ const char kFrameNameKey[] = "name"; BackgroundContentsService::BackgroundContentsService( Profile* profile, const CommandLine* command_line) - : prefs_(NULL), - always_keep_alive_(command_line->HasSwitch(switches::kKeepAliveForTest)) { + : prefs_(NULL) { // Don't load/store preferences if the proper switch is not enabled, or if // the parent profile is off the record. if (!profile->IsOffTheRecord() && @@ -85,14 +84,6 @@ void BackgroundContentsService::StartObserving(Profile* profile) { // BackgroundContents. registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, Source<Profile>(profile)); - - if (always_keep_alive_ && !profile->IsOffTheRecord()) { - // For testing, keep the browser process alive until there is an explicit - // shutdown. - registrar_.Add(this, NotificationType::APP_TERMINATING, - NotificationService::AllSources()); - BrowserList::StartKeepAlive(); - } } void BackgroundContentsService::Observe(NotificationType type, @@ -121,11 +112,6 @@ void BackgroundContentsService::Observe(NotificationType type, ShutdownAssociatedBackgroundContents( ASCIIToUTF16(Details<Extension>(details)->id())); break; - case NotificationType::APP_TERMINATING: - // Performing an explicit shutdown, so allow the browser process to exit. - DCHECK(always_keep_alive_); - BrowserList::EndKeepAlive(); - break; default: NOTREACHED(); break; |