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

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: Created 4 years, 10 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/lifetime/keep_alive_types.cc
diff --git a/chrome/browser/lifetime/keep_alive_types.cc b/chrome/browser/lifetime/keep_alive_types.cc
index e7eb471b02c5caae75400b63fc1bd7a7f442c70e..b323f4dccbf36416e4e31c1a1710c4d2b18d9150 100644
--- a/chrome/browser/lifetime/keep_alive_types.cc
+++ b/chrome/browser/lifetime/keep_alive_types.cc
@@ -4,25 +4,43 @@
#include "keep_alive_types.h"
+namespace keep_alive {
+
#ifndef NDEBUG
-std::ostream& operator<<(std::ostream& out, const keep_alive::Origin& origin) {
+std::ostream& operator<<(std::ostream& out, const Origin& origin) {
switch (origin) {
- case keep_alive::Origin::BACKGROUND_MODE_MANAGER:
+ case Origin::BACKGROUND_MODE_MANAGER:
return out << "BACKGROUND_MODE_MANAGER";
- case keep_alive::Origin::APP_LIST_SERVICE_VIEWS:
+ case Origin::BACKGROUND_MODE_MANAGER_STARTUP:
+ return out << "BACKGROUND_MODE_MANAGER_STARTUP";
+ case Origin::APP_LIST_SERVICE_VIEWS:
return out << "APP_LIST_SERVICE_VIEWS";
- case keep_alive::Origin::APP_LIST_SHOWER:
+ case Origin::APP_LIST_SHOWER:
return out << "APP_LIST_SHOWER";
- case keep_alive::Origin::CHROME_APP_DELEGATE:
+ case Origin::CHROME_APP_DELEGATE:
return out << "CHROME_APP_DELEGATE";
- case keep_alive::Origin::PANEL_VIEW:
+ case Origin::PANEL_VIEW:
return out << "PANEL_VIEW";
- case keep_alive::Origin::PROFILE_LOADER:
+ case Origin::PROFILE_LOADER:
return out << "PROFILE_LOADER";
- case keep_alive::Origin::USER_MANAGER_VIEW:
+ case Origin::USER_MANAGER_VIEW:
return out << "USER_MANAGER_VIEW";
default:
return out << static_cast<int>(origin);
}
}
+
+std::ostream& operator<<(std::ostream& out, const RestartOption& restart) {
+ switch (restart) {
+ case RestartOption::DISABLED:
+ return out << "DISABLED";
+ case RestartOption::ENABLED:
+ return out << "ENABLED";
+ default:
Bernhard Bauer 2016/02/24 16:54:34 This isn't necessary if you enumerate all the valu
dgn 2016/02/26 14:34:29 Done.
+ return out << static_cast<int>(restart);
+ }
+}
+
+} // namespace keep_alive
+
#endif // ndef DEBUG

Powered by Google App Engine
This is Rietveld 408576698