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

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

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: nocompile test Created 3 years, 6 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // Tracks whether the external connection results were all fetched before 345 // Tracks whether the external connection results were all fetched before
346 // the gaia cookie manager service tried to use them with merge session. 346 // the gaia cookie manager service tried to use them with merge session.
347 // |time_to_check_connections| is the time it took to complete. 347 // |time_to_check_connections| is the time it took to complete.
348 void LogExternalCcResultFetches( 348 void LogExternalCcResultFetches(
349 bool fetches_completed, 349 bool fetches_completed,
350 const base::TimeDelta& time_to_check_connections); 350 const base::TimeDelta& time_to_check_connections);
351 351
352 // Track when the current authentication error changed. 352 // Track when the current authentication error changed.
353 void LogAuthError(GoogleServiceAuthError::State auth_error); 353 void LogAuthError(GoogleServiceAuthError::State auth_error);
354 354
355 void LogSigninConfirmHistogramValue(int action); 355 void LogSigninConfirmHistogramValue(ConfirmationUsage action);
356 356
357 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric); 357 void LogXDevicePromoEligible(CrossDevicePromoEligibility metric);
358 358
359 void LogXDevicePromoInitialized(CrossDevicePromoInitialized metric); 359 void LogXDevicePromoInitialized(CrossDevicePromoInitialized metric);
360 360
361 void LogBrowsingSessionDuration(const base::Time& previous_activity_time); 361 void LogBrowsingSessionDuration(const base::Time& previous_activity_time);
362 362
363 // Records the AccountReconcilor |state| when GAIA returns a specific response. 363 // Records the AccountReconcilor |state| when GAIA returns a specific response.
364 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will 364 // If |state| is different than ACCOUNT_RECONCILOR_OK it means the user will
365 // be shown a different set of accounts in the content-area and the settings UI. 365 // 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
421 UMA_HISTOGRAM_ENUMERATION(name "_Periodic", sample, boundary_value); \ 421 UMA_HISTOGRAM_ENUMERATION(name "_Periodic", sample, boundary_value); \
422 break; \ 422 break; \
423 case ReportingType::ON_CHANGE: \ 423 case ReportingType::ON_CHANGE: \
424 UMA_HISTOGRAM_ENUMERATION(name "_OnChange", sample, boundary_value); \ 424 UMA_HISTOGRAM_ENUMERATION(name "_OnChange", sample, boundary_value); \
425 break; \ 425 break; \
426 } 426 }
427 427
428 } // namespace signin_metrics 428 } // namespace signin_metrics
429 429
430 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_ 430 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698