Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: chrome/browser/background/background_mode_manager_unittest.cc

Issue 176363002: Rename Start/EndKeepAlive to Increment/DecrementKeepAliveCount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (rename_keep_alive) Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/chromeos/login/login_display_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698