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

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

Issue 1376063005: Cleanup: Pull some browser keep alive functions into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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 | « chrome/browser/apps/scoped_keep_alive.cc ('k') | 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 8ced6a73742b85153f7d02ce4f2202564bc21cc3..6471d4f90cda2097667565a2e08e8255cf3ec584 100644
--- a/chrome/browser/background/background_mode_manager.h
+++ b/chrome/browser/background/background_mode_manager.h
@@ -36,6 +36,10 @@ namespace base {
class CommandLine;
}
+namespace browser_lifetime {
+class ScopedKeepAlive;
+}
+
typedef std::vector<base::Closure> CommandIdHandlerVector;
// BackgroundModeManager is responsible for switching Chrome into and out of
@@ -413,10 +417,10 @@ class BackgroundModeManager
// user disables/enables background mode via preferences.
bool in_background_mode_;
- // Set when we are keeping chrome running during the startup process - this
+ // Set when we are keeping Chrome running during the startup process - this
// is required when running with the --no-startup-window flag, as otherwise
// chrome would immediately exit due to having no open windows.
- bool keep_alive_for_startup_;
+ scoped_ptr<browser_lifetime::ScopedKeepAlive> keep_alive_for_startup_;
// Set to true when Chrome is running with the --keep-alive-for-test flag
// (used for testing background mode without having to install a background
@@ -427,7 +431,7 @@ class BackgroundModeManager
bool background_mode_suspended_;
// Set to true when background mode is keeping Chrome alive.
- bool keeping_alive_;
+ scoped_ptr<browser_lifetime::ScopedKeepAlive> keep_alive_for_background_mode_;
base::WeakPtrFactory<BackgroundModeManager> weak_factory_;
« no previous file with comments | « chrome/browser/apps/scoped_keep_alive.cc ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698