| Index: chrome/browser/background/background_mode_manager_unittest.cc
|
| diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc
|
| index cdbe6bfa73fd39d538029c5385b480d7effcf46f..28de86dd34f4c31c5c9f2aa17ed5db44a6a292c2 100644
|
| --- a/chrome/browser/background/background_mode_manager_unittest.cc
|
| +++ b/chrome/browser/background/background_mode_manager_unittest.cc
|
| @@ -420,7 +420,7 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGeneration) {
|
| // tearing down our thread bundle before we've had chance to clean
|
| // everything up. Keeping Chrome alive prevents this.
|
| // We aren't interested in if the keep alive works correctly in this test.
|
| - chrome::StartKeepAlive();
|
| + chrome::IncrementKeepAliveCount();
|
| TestingProfile* profile = profile_manager->CreateTestingProfile("p");
|
|
|
| #if defined(OS_CHROMEOS)
|
| @@ -430,9 +430,9 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGeneration) {
|
| chromeos::ScopedTestUserManager test_user_manager;
|
|
|
| // On ChromeOS shutdown, HandleAppExitingForPlatform will call
|
| - // chrome::EndKeepAlive because it assumes the aura shell
|
| - // called chrome::StartKeepAlive. Simulate the call here.
|
| - chrome::StartKeepAlive();
|
| + // chrome::DecrementKeepAliveCount because it assumes the aura shell
|
| + // called chrome::IncrementKeepAliveCount. Simulate the call here.
|
| + chrome::IncrementKeepAliveCount();
|
| #endif
|
|
|
| scoped_refptr<extensions::Extension> component_extension(
|
| @@ -519,7 +519,8 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGeneration) {
|
|
|
| // We're getting ready to shutdown the message loop. Clear everything out!
|
| base::MessageLoop::current()->RunUntilIdle();
|
| - chrome::EndKeepAlive(); // Matching the above chrome::StartKeepAlive().
|
| + chrome::DecrementKeepAliveCount(); // Matching the above
|
| + // chrome::IncrementKeepAliveCount().
|
|
|
| // TestBackgroundModeManager has dependencies on the infrastructure.
|
| // It should get cleared first.
|
| @@ -532,8 +533,9 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGeneration) {
|
| // before tearing down the Message Center.
|
| profile_manager.reset();
|
|
|
| - // Message Center shutdown must occur after the EndKeepAlive because
|
| - // EndKeepAlive will end up referencing the message center during cleanup.
|
| + // Message Center shutdown must occur after the DecrementKeepAliveCount
|
| + // because DecrementKeepAliveCount will end up referencing the message
|
| + // center during cleanup.
|
| message_center::MessageCenter::Shutdown();
|
|
|
| // Clear the shutdown flag to isolate the remaining effect of this test.
|
| @@ -554,7 +556,7 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
|
| // tearing down our thread bundle before we've had chance to clean
|
| // everything up. Keeping Chrome alive prevents this.
|
| // We aren't interested in if the keep alive works correctly in this test.
|
| - chrome::StartKeepAlive();
|
| + chrome::IncrementKeepAliveCount();
|
| TestingProfile* profile1 = profile_manager->CreateTestingProfile("p1");
|
| TestingProfile* profile2 = profile_manager->CreateTestingProfile("p2");
|
|
|
| @@ -565,9 +567,9 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
|
| chromeos::ScopedTestUserManager test_user_manager;
|
|
|
| // On ChromeOS shutdown, HandleAppExitingForPlatform will call
|
| - // chrome::EndKeepAlive because it assumes the aura shell
|
| - // called chrome::StartKeepAlive. Simulate the call here.
|
| - chrome::StartKeepAlive();
|
| + // chrome::DecrementKeepAliveCount because it assumes the aura shell
|
| + // called chrome::IncrementKeepAliveCount. Simulate the call here.
|
| + chrome::IncrementKeepAliveCount();
|
| #endif
|
|
|
| scoped_refptr<extensions::Extension> component_extension(
|
| @@ -742,7 +744,8 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
|
|
|
| // We're getting ready to shutdown the message loop. Clear everything out!
|
| base::MessageLoop::current()->RunUntilIdle();
|
| - chrome::EndKeepAlive(); // Matching the above chrome::StartKeepAlive().
|
| + chrome::DecrementKeepAliveCount(); // Matching the above
|
| + // chrome::IncrementKeepAliveCount().
|
|
|
| // TestBackgroundModeManager has dependencies on the infrastructure.
|
| // It should get cleared first.
|
| @@ -755,8 +758,9 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
|
| // before tearing down the Message Center.
|
| profile_manager.reset();
|
|
|
| - // Message Center shutdown must occur after the EndKeepAlive because
|
| - // EndKeepAlive will end up referencing the message center during cleanup.
|
| + // Message Center shutdown must occur after the DecrementKeepAliveCount
|
| + // because DecrementKeepAliveCount will end up referencing the message
|
| + // center during cleanup.
|
| message_center::MessageCenter::Shutdown();
|
|
|
| // Clear the shutdown flag to isolate the remaining effect of this test.
|
|
|