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

Side by Side Diff: components/signin/core/browser/signin_metrics.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
7 7
8 #include <limits.h> 8 #include <limits.h>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // The credentials are being transfered to a new profile, so the old one is 46 // The credentials are being transfered to a new profile, so the old one is
47 // signed out. 47 // signed out.
48 TRANSFER_CREDENTIALS, 48 TRANSFER_CREDENTIALS,
49 // Signed out because credentials are invalid and force-sign-in is enabled. 49 // Signed out because credentials are invalid and force-sign-in is enabled.
50 AUTHENTICATION_FAILED_WITH_FORCE_SIGNIN, 50 AUTHENTICATION_FAILED_WITH_FORCE_SIGNIN,
51 // Keep this as the last enum. 51 // Keep this as the last enum.
52 NUM_PROFILE_SIGNOUT_METRICS, 52 NUM_PROFILE_SIGNOUT_METRICS,
53 }; 53 };
54 54
55 // Enum values used for use with "AutoLogin.Reverse" histograms. 55 // Enum values used for use with "AutoLogin.Reverse" histograms.
56 enum { 56 enum APAction {
57 // The infobar was shown to the user. 57 // The infobar was shown to the user.
58 HISTOGRAM_SHOWN, 58 HISTOGRAM_SHOWN,
59 // The user pressed the accept button to perform the suggested action. 59 // The user pressed the accept button to perform the suggested action.
60 HISTOGRAM_ACCEPTED, 60 HISTOGRAM_ACCEPTED,
61 // The user pressed the reject to turn off the feature. 61 // The user pressed the reject to turn off the feature.
62 HISTOGRAM_REJECTED, 62 HISTOGRAM_REJECTED,
63 // The user pressed the X button to dismiss the infobar this time. 63 // The user pressed the X button to dismiss the infobar this time.
64 HISTOGRAM_DISMISSED, 64 HISTOGRAM_DISMISSED,
65 // The user completely ignored the infoar. Either they navigated away, or 65 // The user completely ignored the infoar. Either they navigated away, or
66 // they used the page as is. 66 // they used the page as is.
67 HISTOGRAM_IGNORED, 67 HISTOGRAM_IGNORED,
68 // The user clicked on the learn more link in the infobar. 68 // The user clicked on the learn more link in the infobar.
69 HISTOGRAM_LEARN_MORE, 69 HISTOGRAM_LEARN_MORE,
70 // The sync was started with default settings. 70 // The sync was started with default settings.
71 HISTOGRAM_WITH_DEFAULTS, 71 HISTOGRAM_WITH_DEFAULTS,
72 // The sync was started with advanced settings. 72 // The sync was started with advanced settings.
73 HISTOGRAM_WITH_ADVANCED, 73 HISTOGRAM_WITH_ADVANCED,
74 // The sync was started through auto-accept with default settings. 74 // The sync was started through auto-accept with default settings.
75 HISTOGRAM_AUTO_WITH_DEFAULTS, 75 HISTOGRAM_AUTO_WITH_DEFAULTS,
76 // The sync was started through auto-accept with advanced settings. 76 // The sync was started through auto-accept with advanced settings.
77 HISTOGRAM_AUTO_WITH_ADVANCED, 77 HISTOGRAM_AUTO_WITH_ADVANCED,
78 // The sync was aborted with an undo button. 78 // The sync was aborted with an undo button.
79 HISTOGRAM_UNDO, 79 HISTOGRAM_UNDO,
80 HISTOGRAM_MAX 80 HISTOGRAM_MAX
81 }; 81 };
82 82
83 // Enum values used with the "Signin.OneClickConfirmation" histogram, which 83 // Enum values used with the "Signin.OneClickConfirmation" histogram, which
84 // tracks the actions used in the OneClickConfirmation bubble. 84 // tracks the actions used in the OneClickConfirmation bubble.
85 enum { 85 enum ConfirmationUsage {
86 HISTOGRAM_CONFIRM_SHOWN, 86 HISTOGRAM_CONFIRM_SHOWN,
87 HISTOGRAM_CONFIRM_OK, 87 HISTOGRAM_CONFIRM_OK,
88 HISTOGRAM_CONFIRM_RETURN, 88 HISTOGRAM_CONFIRM_RETURN,
89 HISTOGRAM_CONFIRM_ADVANCED, 89 HISTOGRAM_CONFIRM_ADVANCED,
90 HISTOGRAM_CONFIRM_CLOSE, 90 HISTOGRAM_CONFIRM_CLOSE,
91 HISTOGRAM_CONFIRM_ESCAPE, 91 HISTOGRAM_CONFIRM_ESCAPE,
92 HISTOGRAM_CONFIRM_UNDO, 92 HISTOGRAM_CONFIRM_UNDO,
93 HISTOGRAM_CONFIRM_LEARN_MORE, 93 HISTOGRAM_CONFIRM_LEARN_MORE,
94 HISTOGRAM_CONFIRM_LEARN_MORE_OK, 94 HISTOGRAM_CONFIRM_LEARN_MORE_OK,
95 HISTOGRAM_CONFIRM_LEARN_MORE_RETURN, 95 HISTOGRAM_CONFIRM_LEARN_MORE_RETURN,
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // Tracks whether the external connection results were all fetched before 346 // Tracks whether the external connection results were all fetched before
347 // the gaia cookie manager service tried to use them with merge session. 347 // the gaia cookie manager service tried to use them with merge session.
348 // |time_to_check_connections| is the time it took to complete. 348 // |time_to_check_connections| is the time it took to complete.
349 void LogExternalCcResultFetches( 349 void LogExternalCcResultFetches(
350 bool fetches_completed, 350 bool fetches_completed,
351 const base::TimeDelta& time_to_check_connections); 351 const base::TimeDelta& time_to_check_connections);
352 352
353 // Track when the current authentication error changed. 353 // Track when the current authentication error changed.
354 void LogAuthError(GoogleServiceAuthError::State auth_error); 354 void LogAuthError(GoogleServiceAuthError::State auth_error);
355 355
356 void LogSigninConfirmHistogramValue(int action); 356 void LogSigninConfirmHistogramValue(ConfirmationUsage action);
357 357
358 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric); 358 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric);
359 359
360 void LogXDevicePromoInitialized(CrossDevicePromoInitialized metric); 360 void LogXDevicePromoInitialized(CrossDevicePromoInitialized metric);
361 361
362 void LogBrowsingSessionDuration(const base::Time& previous_activity_time); 362 void LogBrowsingSessionDuration(const base::Time& previous_activity_time);
363 363
364 // Records the AccountReconcilor |state| when GAIA returns a specific response. 364 // Records the AccountReconcilor |state| when GAIA returns a specific response.
365 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will 365 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will
366 // be shown a different set of accounts in the content-area and the settings UI. 366 // be shown a different set of accounts in the content-area and the settings UI.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 UMA_HISTOGRAM_ENUMERATION(name "_Periodic", sample, boundary_value); \ 422 UMA_HISTOGRAM_ENUMERATION(name "_Periodic", sample, boundary_value); \
423 break; \ 423 break; \
424 case ReportingType::ON_CHANGE: \ 424 case ReportingType::ON_CHANGE: \
425 UMA_HISTOGRAM_ENUMERATION(name "_OnChange", sample, boundary_value); \ 425 UMA_HISTOGRAM_ENUMERATION(name "_OnChange", sample, boundary_value); \
426 break; \ 426 break; \
427 } 427 }
428 428
429 } // namespace signin_metrics 429 } // namespace signin_metrics
430 430
431 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 431 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
OLDNEW
« no previous file with comments | « components/search_provider_logos/logo_tracker.cc ('k') | components/signin/core/browser/signin_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698