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

Unified Diff: chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc

Issue 385983007: Enrollment recovery: Add UMA stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cosmetics. Created 6 years, 5 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/ui/webui/chromeos/login/enrollment_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
index b4b8f02f9f00ed226f9894681e5e5baa259c1989..0422a8397dd55a6b1f220bb363cb5de386243347 100644
--- a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
@@ -48,23 +48,11 @@ const char kEnrollmentStepSignin[] = "signin";
const char kEnrollmentStepSuccess[] = "success";
// Enrollment mode strings.
-const char kEnrollmentModeManual[] = "manual";
-const char kEnrollmentModeForced[] = "forced";
-const char kEnrollmentModeAuto[] = "auto";
+const char* const kModeStrings[EnrollmentScreenActor::ENROLLMENT_MODE_COUNT] =
+ { "manual", "forced", "auto", "recovery" };
std::string EnrollmentModeToString(EnrollmentScreenActor::EnrollmentMode mode) {
- switch (mode) {
- case EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL:
- return kEnrollmentModeManual;
- case EnrollmentScreenActor::ENROLLMENT_MODE_FORCED:
- return kEnrollmentModeForced;
- case EnrollmentScreenActor::ENROLLMENT_MODE_AUTO:
- return kEnrollmentModeAuto;
- default:
- NOTREACHED() << "Bad enrollment mode " << mode;
- }
-
- return kEnrollmentModeManual;
+ return kModeStrings[mode];
pastarmovj 2014/07/14 08:46:06 This is potentially an issue. You should not rely
Thiemo Nagel 2014/07/14 10:30:35 Done.
}
// A helper class that takes care of asynchronously revoking a given token.

Powered by Google App Engine
This is Rietveld 408576698