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

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

Issue 10831254: Make --keep-alive-for-test respect the kBackgroundModeEnabled flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add tests Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_mode_manager.h
diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h
index e38f5e0c7ef49d99ae3d91a1568077c1fef9c774..a52328d12169dd850c41b10bf048b0df5f89433f 100644
--- a/chrome/browser/background/background_mode_manager.h
+++ b/chrome/browser/background/background_mode_manager.h
@@ -74,6 +74,10 @@ class BackgroundModeManager
FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
BackgroundAppInstallUninstallWhileDisabled);
FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
+ BackgroundModeDisabledPreventsKeepAliveOnStartup);
+ FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
+ DisableBackgroundModeUnderTestFlag);
+ FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
EnableAfterBackgroundAppInstall);
FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
MultiProfile);
@@ -154,6 +158,9 @@ class BackgroundModeManager
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // Called when the kBackgroundModeEnabled preference changes.
+ void OnBackgroundModeEnabledPrefChanged();
+
// BackgroundApplicationListModel::Observer implementation.
virtual void OnApplicationDataChanged(const extensions::Extension* extension,
Profile* profile) OVERRIDE;
@@ -256,6 +263,9 @@ class BackgroundModeManager
// Returns the number of background apps for a profile.
virtual int GetBackgroundAppCountForProfile(Profile* const profile) const;
+ // Returns true if we should be in background mode.
+ bool ShouldBeInBackgroundMode() const;
+
// Reference to the profile info cache. It is used to update the background
// app status of profiles when they open/close background apps.
ProfileInfoCache* profile_cache_;
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698