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

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

Issue 2173103002: Recategorize ARC auth sign in errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment Created 4 years, 4 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 namespace base { 8 namespace base {
9 class TimeDelta; 9 class TimeDelta;
10 } 10 }
11 11
12 namespace arc { 12 namespace arc {
13 13
14 // These enums are used to define the buckets for an enumerated UMA histogram 14 // These enums are used to define the buckets for an enumerated UMA histogram
15 // and need to be synced with histograms.xml 15 // and need to be synced with histograms.xml
16 enum class OptInActionType : int { 16 enum class OptInActionType : int {
17 OPTED_OUT = 0, // Arc was opted out by user. 17 OPTED_OUT = 0, // Arc was opted out by user.
18 OPTED_IN = 1, // Arc was opted in by user. 18 OPTED_IN = 1, // Arc was opted in by user.
19 NOTIFICATION_ACCEPTED = 2, // Arc OptIn notification was accepted. 19 NOTIFICATION_ACCEPTED = 2, // Arc OptIn notification was accepted.
20 NOTIFICATION_DECLINED = 3, // Arc OptIn notification was declined. 20 NOTIFICATION_DECLINED = 3, // Arc OptIn notification was declined.
21 NOTIFICATION_TIMED_OUT = 4, // Arc OptIn notification was timed out. 21 NOTIFICATION_TIMED_OUT = 4, // Arc OptIn notification was timed out.
22 RETRY = 5, // User asked to retry OptIn. 22 RETRY = 5, // User asked to retry OptIn.
23 SIZE, // The size of this enum; keep last. 23 SIZE, // The size of this enum; keep last.
24 }; 24 };
25 25
26 enum class OptInCancelReason { 26 enum class OptInCancelReason {
27 USER_CANCEL = 0, // Canceled by user. 27 USER_CANCEL = 0, // Canceled by user.
28 UNKNOWN_ERROR = 1, // Unclassified failure. 28 UNKNOWN_ERROR = 1, // Unclassified failure.
29 NETWORK_ERROR = 2, // Network failure. 29 NETWORK_ERROR = 2, // Network failure.
30 SERVICE_UNAVAILABLE = 3, // GMS Services are not available. 30 SERVICE_UNAVAILABLE = 3, // GMS Services are not available.
31 BAD_AUTHENTICATION = 4, // Bad authentication returned by server. 31 DEPRECATED_BAD_AUTHENTICATION = 4,
32 GMS_CORE_NOT_AVAILABLE = 5, // GMS Core is not available. 32 DEPRECATED_GMS_CORE_NOT_AVAILABLE = 5,
33 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed. 33 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed.
34 ANDROID_MANAGEMENT_REQUIRED = 7, // Android management is required for user. 34 ANDROID_MANAGEMENT_REQUIRED = 7, // Android management is required for user.
35 SIZE, // The size of this enum; keep last. 35 SIZE, // The size of this enum; keep last.
36 }; 36 };
37 37
38 enum class ProvisioningResult { 38 // The values should be listed in ascending order for SIZE a last, for safety.
39 SUCCESS = 0, // Provisioning was successful. 39 // For detailed meaning, please see also to auth.mojom.
40 UNKNOWN_ERROR = 1, // Unclassified failure. 40 enum class ProvisioningResult : int {
41 NETWORK_ERROR = 2, // Network failure. 41 // Provisioning was successful.
42 SERVICE_UNAVAILABLE = 3, // GMS Services are not available. 42 SUCCESS = 0,
43 BAD_AUTHENTICATION = 4, // Bad authentication returned by server. 43
44 GMS_CORE_NOT_AVAILABLE = 5, // GMS Core is not available. 44 // Unclassified failure.
45 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed. 45 UNKNOWN_ERROR = 1,
46 SIZE, // The size of this enum; keep last. 46
47 // GMS errors. More errors defined below.
48 GMS_NETWORK_ERROR = 2,
49 GMS_SERVICE_UNAVAILABLE = 3,
50 GMS_BAD_AUTHENTICATION = 4,
51
52 // Check in error. More errors defined below.
53 DEVICE_CHECK_IN_FAILED = 5,
54
55 // Cloud provision error. More errors defined below.
56 CLOUD_PROVISION_FLOW_FAILED = 6,
57
58 // Mojo errors.
59 MOJO_VERSION_MISMATCH = 7,
60 MOJO_CALL_TIMEOUT = 8,
61
62 // Check in error.
63 DEVICE_CHECK_IN_TIMEOUT = 9,
64 DEVICE_CHECK_IN_INTERNAL_ERROR = 10,
65
66 // GMS errors:
67 GMS_SIGN_IN_FAILED = 11,
68 GMS_SIGN_IN_TIMEOUT = 12,
69 GMS_SIGN_IN_INTERNAL_ERROR = 13,
70
71 // Cloud provision error:
72 CLOUD_PROVISION_FLOW_TIMEOUT = 14,
73 CLOUD_PROVISION_FLOW_INTERNAL_ERROR = 15,
74
75 // ARC instance is stopped during the sign in procedure.
76 ARC_STOPPED = 16,
77
78 // The size of this enum; keep last.
79 SIZE,
47 }; 80 };
48 81
49 void UpdateOptInActionUMA(OptInActionType type); 82 void UpdateOptInActionUMA(OptInActionType type);
50 void UpdateOptInCancelUMA(OptInCancelReason reason); 83 void UpdateOptInCancelUMA(OptInCancelReason reason);
51 void UpdateEnabledStateUMA(bool enabled); 84 void UpdateEnabledStateUMA(bool enabled);
52 void UpdateProvisioningResultUMA(ProvisioningResult result); 85 void UpdateProvisioningResultUMA(ProvisioningResult result);
53 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time, 86 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time,
54 bool success, 87 bool success,
55 bool managed); 88 bool managed);
56 89
57 } // namespace arc 90 } // namespace arc
58 91
59 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ 92 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698