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

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

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog Created 4 years, 9 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.cc
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
index c653c9f18ccd3677aced71d9fc016b920ad0e82e..1e21d156b6d2392fa9a3593cc029677bd341e6cb 100644
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/lifetime/keep_alive_registry.h"
#include "chrome/browser/lifetime/keep_alive_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
@@ -648,7 +649,7 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) {
// Background mode must already be enabled (as otherwise this menu would
// not be visible).
DCHECK(IsBackgroundModePrefEnabled());
- DCHECK(chrome::WillKeepAlive());
+ DCHECK(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
RecordMenuItemClick(MENU_ITEM_KEEP_RUNNING);
« no previous file with comments | « chrome/browser/apps/app_window_interactive_uitest.cc ('k') | chrome/browser/background/background_mode_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698