diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 19:46:42 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 19:46:42 +0000 |
commit | 3e53c10b59d57a012b5d40f3c66ec2a30b11245c (patch) | |
tree | a197b93380c60503aa61475fe809a65aadf2fa26 | |
parent | 58a020ec48902082f9ba8f47637b4e29a1ce6aa6 (diff) | |
download | chromium_src-3e53c10b59d57a012b5d40f3c66ec2a30b11245c.zip chromium_src-3e53c10b59d57a012b5d40f3c66ec2a30b11245c.tar.gz chromium_src-3e53c10b59d57a012b5d40f3c66ec2a30b11245c.tar.bz2 |
Remove keepalive code from BackgroundContentsService
BUG=53602
TEST=Updated BackgroundContentsService unittests
Review URL: http://codereview.chromium.org/3234003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57720 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/background_contents_service.cc | 9 | ||||
-rw-r--r-- | chrome/browser/background_contents_service_unittest.cc | 3 |
2 files changed, 0 insertions, 12 deletions
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc index f2496d9..e50572c 100644 --- a/chrome/browser/background_contents_service.cc +++ b/chrome/browser/background_contents_service.cc @@ -238,11 +238,6 @@ void BackgroundContentsService::ShutdownAssociatedBackgroundContents( void BackgroundContentsService::BackgroundContentsOpened( BackgroundContentsOpenedDetails* details) { - // If this is the first BackgroundContents loaded, kick ourselves into - // persistent mode. - if (contents_map_.empty()) - BrowserList::StartKeepAlive(); - // Add the passed object to our list. Should not already be tracked. DCHECK(!IsTracked(details->contents)); DCHECK(!details->application_id.empty()); @@ -263,10 +258,6 @@ void BackgroundContentsService::BackgroundContentsShutdown( DCHECK(IsTracked(background_contents)); string16 appid = GetParentApplicationId(background_contents); contents_map_.erase(appid); - // If we have no more BackgroundContents active, then stop keeping the browser - // process alive. - if (contents_map_.empty()) - BrowserList::EndKeepAlive(); } BackgroundContents* BackgroundContentsService::GetAppBackgroundContents( diff --git a/chrome/browser/background_contents_service_unittest.cc b/chrome/browser/background_contents_service_unittest.cc index 1176415..84c78ac 100644 --- a/chrome/browser/background_contents_service_unittest.cc +++ b/chrome/browser/background_contents_service_unittest.cc @@ -114,12 +114,9 @@ TEST_F(BackgroundContentsServiceTest, BackgroundContentsCreateDestroy) { BackgroundContentsService service(&profile, command_line_.get()); MockBackgroundContents* contents = new MockBackgroundContents(&profile); EXPECT_FALSE(service.IsTracked(contents)); - EXPECT_FALSE(BrowserList::WillKeepAlive()); contents->SendOpenedNotification(); - EXPECT_TRUE(BrowserList::WillKeepAlive()); EXPECT_TRUE(service.IsTracked(contents)); delete contents; - EXPECT_FALSE(BrowserList::WillKeepAlive()); EXPECT_FALSE(service.IsTracked(contents)); } |