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

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

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_types.h ('k') | chrome/browser/lifetime/scoped_keep_alive.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/keep_alive_types.cc
diff --git a/chrome/browser/lifetime/keep_alive_types.cc b/chrome/browser/lifetime/keep_alive_types.cc
index 0cd4fcea9b98d302e12378a82fb501cda705322a..a96050ee1aa989d4b60aef9a8f5227eb0c226db8 100644
--- a/chrome/browser/lifetime/keep_alive_types.cc
+++ b/chrome/browser/lifetime/keep_alive_types.cc
@@ -10,6 +10,8 @@ std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin) {
switch (origin) {
case KeepAliveOrigin::BACKGROUND_MODE_MANAGER:
return out << "BACKGROUND_MODE_MANAGER";
+ case KeepAliveOrigin::BACKGROUND_MODE_MANAGER_STARTUP:
+ return out << "BACKGROUND_MODE_MANAGER_STARTUP";
case KeepAliveOrigin::APP_LIST_SERVICE_VIEWS:
return out << "APP_LIST_SERVICE_VIEWS";
case KeepAliveOrigin::APP_LIST_SHOWER:
@@ -27,4 +29,18 @@ std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin) {
NOTREACHED();
return out << static_cast<int>(origin);
}
-#endif // ndef DEBUG
+
+std::ostream& operator<<(std::ostream& out,
+ const KeepAliveRestartOption& restart) {
+ switch (restart) {
+ case KeepAliveRestartOption::DISABLED:
+ return out << "DISABLED";
+ case KeepAliveRestartOption::ENABLED:
+ return out << "ENABLED";
+ }
+
+ NOTREACHED();
+ return out << static_cast<int>(restart);
+}
+
+#endif // ndef NDEBUG
« no previous file with comments | « chrome/browser/lifetime/keep_alive_types.h ('k') | chrome/browser/lifetime/scoped_keep_alive.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698