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

Unified Diff: chrome/browser/lifetime/keep_alive_types.h

Issue 1725883002: Add KeepAliveStateObserver, add the Restart option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KeepAlive
Patch Set: Address comments 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
« no previous file with comments | « chrome/browser/lifetime/keep_alive_state_observer.h ('k') | chrome/browser/lifetime/keep_alive_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/keep_alive_types.h
diff --git a/chrome/browser/lifetime/keep_alive_types.h b/chrome/browser/lifetime/keep_alive_types.h
index 0fc846649f4311c70407f0062eb489bf5d4e6399..e41d5c1ce523e9e58d436aa7ee866f654b51dc07 100644
--- a/chrome/browser/lifetime/keep_alive_types.h
+++ b/chrome/browser/lifetime/keep_alive_types.h
@@ -7,9 +7,16 @@
#include <ostream>
+// Types here are used to register KeepAlives.
+// They Give indications about which kind of optimizations are allowed during
+// the KeepAlive's lifetime. This allows to have more info about the state of
+// the browser to optimize the resource consumption.
+
+// Refers to the what the KeepAlive's lifetime is tied to, to help debugging.
enum class KeepAliveOrigin {
// c/b/background
BACKGROUND_MODE_MANAGER,
+ BACKGROUND_MODE_MANAGER_STARTUP,
// c/b/ui
APP_LIST_SERVICE_VIEWS,
@@ -20,8 +27,14 @@ enum class KeepAliveOrigin {
USER_MANAGER_VIEW
};
+// Restart: Allow Chrome to restart when all the registered KeepAlives allow
+// restarts
+enum class KeepAliveRestartOption { DISABLED, ENABLED };
+
#ifndef NDEBUG
std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin);
+std::ostream& operator<<(std::ostream& out,
+ const KeepAliveRestartOption& restart);
#endif // ndef NDEBUG
#endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_
« no previous file with comments | « chrome/browser/lifetime/keep_alive_state_observer.h ('k') | chrome/browser/lifetime/keep_alive_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698