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

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: Update error code. Created 4 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 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 enum class ProvisioningResult : int {
39 SUCCESS = 0, // Provisioning was successful. 39 // Provisioning was successful.
40 UNKNOWN_ERROR = 1, // Unclassified failure. 40 SUCCESS = 0,
41 NETWORK_ERROR = 2, // Network failure. 41
42 SERVICE_UNAVAILABLE = 3, // GMS Services are not available. 42 // Unclassified failure.
43 BAD_AUTHENTICATION = 4, // Bad authentication returned by server. 43 UNKNOWN_ERROR = 1,
44 GMS_CORE_NOT_AVAILABLE = 5, // GMS Core is not available. 44
45 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed. 45 // Network failure in GMS sign in.
46 SIZE, // The size of this enum; keep last. 46 GMS_NETWORK_ERROR = 2,
47
48 // GMS Services are not available.
49 GMS_SERVICE_UNAVAILABLE = 3,
50
51 // Bad authentication returned by server.
52 GMS_BAD_AUTHENTICATION = 4,
53
54 // Failed to Check in on the device.
victorhsieh 2016/07/25 20:30:41 nit: checkin
hidehiko 2016/07/26 13:02:58 Done.
55 DEVICE_CHECK_IN_FAILED = 5,
56
57 // Cloud provision flow failed.
58 CLOUD_PROVISION_FLOW_FAILED = 6,
59
60 // ArcAuthHost API version mismatch.
61 MOJO_VERSION_MISMATCH = 7,
62
63 // Invocation of ArcAuthHost API is timed out.
64 MOJO_CALL_TIMEOUT = 8,
65
66 // Failed to sign-in on GMS. No detailed info.
67 GMS_SIGN_IN_FAILED = 9,
68
69 // GMS sign-in is timed out.
70 GMS_SIGN_IN_TIMEOUT = 10,
71
72 // Empty consumer package when getting token.
73 GMS_EMPTY_CONSUMER_PKG_OR_SIG = 11,
74
75 // 2-Factor errors.
76 GMS_NEEDS_2F = 12,
77 GMS_NEEDS_POST_SIGN_IN_FLOW = 13,
78 GMS_NEEDS_BROWSER = 14,
79
80 // Cloud provision flow is timed out.
81 CLOUD_PROVISION_FLOW_TIMEOUT = 15,
victorhsieh 2016/07/25 20:30:42 nit/optional: put this next to CLOUD_PROVISION_FLO
hidehiko 2016/07/26 13:02:58 Can I keep this as is? 1 - 6 are in the order for
victorhsieh 2016/07/26 18:22:11 Not sure I understand this. Aren't their value ex
hidehiko 2016/07/26 18:50:48 Sorry for my poor explanation. This is an enum des
victorhsieh 2016/07/26 19:52:42 The style is probably subjective, especially this
hidehiko 2016/07/27 17:36:12 Looks technical stuff, because "putting SIZE at la
victorhsieh 2016/07/27 18:03:05 I thought SIZE's value is derived from the previou
82
83 // ARC instance is stopped during the sign in procedure.
84 ARC_STOPPED = 16,
85
86 // The size of this enum; keep last.
87 SIZE,
47 }; 88 };
48 89
49 void UpdateOptInActionUMA(OptInActionType type); 90 void UpdateOptInActionUMA(OptInActionType type);
50 void UpdateOptInCancelUMA(OptInCancelReason reason); 91 void UpdateOptInCancelUMA(OptInCancelReason reason);
51 void UpdateEnabledStateUMA(bool enabled); 92 void UpdateEnabledStateUMA(bool enabled);
52 void UpdateProvisioningResultUMA(ProvisioningResult result); 93 void UpdateProvisioningResultUMA(ProvisioningResult result);
53 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time, 94 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time,
54 bool success, 95 bool success,
55 bool managed); 96 bool managed);
56 97
57 } // namespace arc 98 } // namespace arc
58 99
59 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ 100 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698