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

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

Issue 10298002: No longer start BG mode until a BackgroundContents is loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prospective fix for cros test failures. Created 8 years, 8 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.h
diff --git a/chrome/browser/background/background_mode_manager.h b/chrome/browser/background/background_mode_manager.h
index 633c92bad4a5cd12bb5fd2044c2ceb4391e63fe2..c97204830fc4ddc51b8ad8ed25bfd4826640dfe2 100644
--- a/chrome/browser/background/background_mode_manager.h
+++ b/chrome/browser/background/background_mode_manager.h
@@ -45,7 +45,6 @@ class BackgroundModeManager
: public content::NotificationObserver,
public BackgroundApplicationListModel::Observer,
public ProfileInfoCacheObserver,
- public ProfileKeyedService,
public ui::SimpleMenuModel::Delegate {
public:
BackgroundModeManager(CommandLine* command_line,
@@ -63,8 +62,9 @@ class BackgroundModeManager
int NumberOfBackgroundModeData();
private:
- friend class TestBackgroundModeManager;
+ friend class AppBackgroundPageApiTest;
friend class BackgroundModeManagerTest;
+ friend class TestBackgroundModeManager;
FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
BackgroundAppLoadUnload);
FRIEND_TEST_ALL_PREFIXES(BackgroundModeManagerTest,
@@ -238,6 +238,9 @@ class BackgroundModeManager
// (virtual to allow overriding in tests).
virtual bool IsBackgroundModePrefEnabled() const;
+ // Returns true if background mode is active. Used only by tests.
+ bool IsBackgroundModeActiveForTest();
+
// Turns off background mode if it's currently enabled.
void DisableBackgroundMode();
« no previous file with comments | « chrome/browser/background/background_contents_service.cc ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698