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

Unified Diff: ios/chrome/browser/ui/sync/sync_util.mm

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 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: ios/chrome/browser/ui/sync/sync_util.mm
diff --git a/ios/chrome/browser/ui/sync/sync_util.mm b/ios/chrome/browser/ui/sync/sync_util.mm
index 6370529ede95f42373587e54602e815d2f372faa..549afa3ebdbc012ad8eb473455c374f5cbe92397 100644
--- a/ios/chrome/browser/ui/sync/sync_util.mm
+++ b/ios/chrome/browser/ui/sync/sync_util.mm
@@ -28,7 +28,7 @@ namespace {
// to the user. This was added for crbug/265352 to quantify how often this
// bug shows up in the wild. The logged histogram count should be interpreted
// as a ratio of the number of active sync users.
-enum {
+enum ErrorState {
SYNC_SIGN_IN_NEEDS_UPDATE = 1,
SYNC_SERVICE_UNAVAILABLE,
SYNC_NEEDS_PASSPHRASE,
@@ -142,7 +142,7 @@ bool displaySyncErrors(ios::ChromeBrowserState* browser_state, Tab* tab) {
return false;
// Logs when an infobar is shown to user. See crbug/265352.
- int loggedErrorState = 0;
+ ErrorState loggedErrorState = SYNC_ERROR_COUNT;
switch (errorState) {
case SyncSetupService::kNoSyncServiceError:
case SyncSetupService::kSyncServiceCouldNotConnect:

Powered by Google App Engine
This is Rietveld 408576698