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

Side by Side Diff: chrome/browser/chromeos/arc/arc_optin_uma.h

Issue 2785813002: arc: Provide UMA for OptIn flow. (Closed)
Patch Set: Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_
7 7
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "components/arc/common/auth.mojom.h" 10 #include "components/arc/common/auth.mojom.h"
(...skipping 10 matching lines...) Expand all
21 OPTED_OUT = 0, // ARC was opted out by user. 21 OPTED_OUT = 0, // ARC was opted out by user.
22 OPTED_IN = 1, // ARC was opted in by user. 22 OPTED_IN = 1, // ARC was opted in by user.
23 NOTIFICATION_ACCEPTED = 2, // ARC OptIn notification was accepted. 23 NOTIFICATION_ACCEPTED = 2, // ARC OptIn notification was accepted.
24 NOTIFICATION_DECLINED = 3, // ARC OptIn notification was declined. 24 NOTIFICATION_DECLINED = 3, // ARC OptIn notification was declined.
25 NOTIFICATION_TIMED_OUT = 4, // ARC OptIn notification was timed out. 25 NOTIFICATION_TIMED_OUT = 4, // ARC OptIn notification was timed out.
26 RETRY = 5, // User asked to retry OptIn. 26 RETRY = 5, // User asked to retry OptIn.
27 SIZE, // The size of this enum; keep last. 27 SIZE, // The size of this enum; keep last.
28 }; 28 };
29 29
30 enum class OptInCancelReason { 30 enum class OptInCancelReason {
31 USER_CANCEL = 0, // Canceled by user. 31 // Canceled by user.
Luis Héctor Chávez 2017/03/30 15:49:25 The formatting for this enum looks different from
khmel 2017/03/30 17:01:43 Done.
32 UNKNOWN_ERROR = 1, // Unclassified failure. 32 USER_CANCEL = 0,
33 NETWORK_ERROR = 2, // Network failure. 33 // Unclassified failure.
34 SERVICE_UNAVAILABLE = 3, // GMS Services are not available. 34 UNKNOWN_ERROR = 1,
35 // Network failure.
36 NETWORK_ERROR = 2,
37 DEPRECATED_SERVICE_UNAVAILABLE = 3,
35 DEPRECATED_BAD_AUTHENTICATION = 4, 38 DEPRECATED_BAD_AUTHENTICATION = 4,
36 DEPRECATED_GMS_CORE_NOT_AVAILABLE = 5, 39 DEPRECATED_GMS_CORE_NOT_AVAILABLE = 5,
37 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed. 40 // Cloud provision flow failed.
38 ANDROID_MANAGEMENT_REQUIRED = 7, // Android management is required for user. 41 CLOUD_PROVISION_FLOW_FAIL = 6,
39 SIZE, // The size of this enum; keep last. 42 // Android management is required for user.
43 ANDROID_MANAGEMENT_REQUIRED = 7,
44 // Cannot start ARC because it is busy.
45 SESSION_BUSY = 8,
46 // The size of this enum; keep last.
47 SIZE,
40 }; 48 };
41 49
42 enum class OptInSilentAuthCode { 50 enum class OptInSilentAuthCode {
43 // Silent auth code feature is disabled. 51 // Silent auth code feature is disabled.
44 DISABLED = 0, 52 DISABLED = 0,
45 // Silent auth code fetched normally. 53 // Silent auth code fetched normally.
46 SUCCESS = 1, 54 SUCCESS = 1,
47 // HTTP Context cannot be prepared. 55 // HTTP Context cannot be prepared.
48 CONTEXT_NOT_READY = 2, 56 CONTEXT_NOT_READY = 2,
49 // No LST token is available. 57 // No LST token is available.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Network connection is unavailable in ARC. 122 // Network connection is unavailable in ARC.
115 NO_NETWORK_CONNECTION = 19, 123 NO_NETWORK_CONNECTION = 19,
116 124
117 // ARC is not enabled. 125 // ARC is not enabled.
118 ARC_DISABLED = 20, 126 ARC_DISABLED = 20,
119 127
120 // The size of this enum; keep last. 128 // The size of this enum; keep last.
121 SIZE, 129 SIZE,
122 }; 130 };
123 131
132 enum class OptInFlowResult : int {
133 // OptIn has been started.
Luis Héctor Chávez 2017/03/30 15:49:25 nit: s/has been/has/
khmel 2017/03/30 17:01:43 Done.
134 STARTED = 0,
135
136 // OptIn has been succeeded, this also includes succeeded with error cases.
137 SUCCEEDED = 1,
138
139 // OptIn has been succeeded but with retry after an error.
140 SUCCEEDED_AFTER_RETRY = 2,
141
142 // OptIn has been canceled, this also includes canceled after error cases.
143 CANCELED = 3,
144
145 // OptIn has been canceled after an error was reported.
146 CANCELED_AFTER_ERROR = 4,
147
148 // The size of this enum; keep last.
149 SIZE,
150 };
151
124 void UpdateOptInActionUMA(OptInActionType type); 152 void UpdateOptInActionUMA(OptInActionType type);
125 void UpdateOptInCancelUMA(OptInCancelReason reason); 153 void UpdateOptInCancelUMA(OptInCancelReason reason);
154 void UpdateOptInFlowResultUMA(OptInFlowResult result);
126 void UpdateEnabledStateUMA(bool enabled); 155 void UpdateEnabledStateUMA(bool enabled);
127 void UpdateProvisioningResultUMA(ProvisioningResult result, bool managed); 156 void UpdateProvisioningResultUMA(ProvisioningResult result, bool managed);
128 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time, 157 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time,
129 bool success, 158 bool success,
130 bool managed); 159 bool managed);
131 void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state); 160 void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state);
132 void UpdateAuthTiming(const char* histogram_name, base::TimeDelta elapsed_time); 161 void UpdateAuthTiming(const char* histogram_name, base::TimeDelta elapsed_time);
133 void UpdateAuthCheckinAttempts(int32_t num_attempts); 162 void UpdateAuthCheckinAttempts(int32_t num_attempts);
134 void UpdateAuthAccountCheckStatus(mojom::AccountCheckStatus status); 163 void UpdateAuthAccountCheckStatus(mojom::AccountCheckStatus status);
135 164
136 // Outputs the stringified |result| to |os|. This is only for logging purposes. 165 // Outputs the stringified |result| to |os|. This is only for logging purposes.
137 std::ostream& operator<<(std::ostream& os, const ProvisioningResult& result); 166 std::ostream& operator<<(std::ostream& os, const ProvisioningResult& result);
138 167
139 } // namespace arc 168 } // namespace arc
140 169
141 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ 170 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_optin_uma.cc » ('j') | chrome/browser/chromeos/arc/arc_session_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698