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

Unified Diff: chrome/browser/chromeos/arc/arc_optin_uma.cc

Issue 2678273005: arc: Logging ARC data removal reasons (Closed)
Patch Set: Addressed feedback Created 3 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_optin_uma.h ('k') | chrome/browser/chromeos/arc/arc_session_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_optin_uma.cc
diff --git a/chrome/browser/chromeos/arc/arc_optin_uma.cc b/chrome/browser/chromeos/arc/arc_optin_uma.cc
index dfa391a8ba33100d76e3f809fdf0e34ca9cb3cce..cea4e1c4a8762618f5ec4217a37c07fd0251ae4b 100644
--- a/chrome/browser/chromeos/arc/arc_optin_uma.cc
+++ b/chrome/browser/chromeos/arc/arc_optin_uma.cc
@@ -56,4 +56,40 @@ void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state) {
static_cast<int>(OptInSilentAuthCode::SIZE));
}
+std::ostream& operator<<(std::ostream& os, const ProvisioningResult& result) {
+#define MAP_PROVISIONING_RESULT(name) \
+ case ProvisioningResult::name: \
+ return os << #name
+
+ switch (result) {
+ MAP_PROVISIONING_RESULT(SUCCESS);
+ MAP_PROVISIONING_RESULT(UNKNOWN_ERROR);
+ MAP_PROVISIONING_RESULT(GMS_NETWORK_ERROR);
+ MAP_PROVISIONING_RESULT(GMS_SERVICE_UNAVAILABLE);
+ MAP_PROVISIONING_RESULT(GMS_BAD_AUTHENTICATION);
+ MAP_PROVISIONING_RESULT(DEVICE_CHECK_IN_FAILED);
+ MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_FAILED);
+ MAP_PROVISIONING_RESULT(MOJO_VERSION_MISMATCH);
+ MAP_PROVISIONING_RESULT(MOJO_CALL_TIMEOUT);
+ MAP_PROVISIONING_RESULT(DEVICE_CHECK_IN_TIMEOUT);
+ MAP_PROVISIONING_RESULT(DEVICE_CHECK_IN_INTERNAL_ERROR);
+ MAP_PROVISIONING_RESULT(GMS_SIGN_IN_FAILED);
+ MAP_PROVISIONING_RESULT(GMS_SIGN_IN_TIMEOUT);
+ MAP_PROVISIONING_RESULT(GMS_SIGN_IN_INTERNAL_ERROR);
+ MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_TIMEOUT);
+ MAP_PROVISIONING_RESULT(CLOUD_PROVISION_FLOW_INTERNAL_ERROR);
+ MAP_PROVISIONING_RESULT(ARC_STOPPED);
+ MAP_PROVISIONING_RESULT(OVERALL_SIGN_IN_TIMEOUT);
+ MAP_PROVISIONING_RESULT(CHROME_SERVER_COMMUNICATION_ERROR);
+ MAP_PROVISIONING_RESULT(SIZE);
+ }
+
+#undef MAP_PROVISIONING_RESULT
+
+ // Some compilers report an error even if all values of an enum-class are
+ // covered exhaustively in a switch statement.
+ NOTREACHED() << "Invalid value " << static_cast<int>(result);
+ return os;
+}
+
} // namespace arc
« no previous file with comments | « chrome/browser/chromeos/arc/arc_optin_uma.h ('k') | chrome/browser/chromeos/arc/arc_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698