OLD | NEW |
---|---|
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 arc { | 8 namespace arc { |
9 | 9 |
10 // These enums are used to define the buckets for an enumerated UMA histogram | 10 // These enums are used to define the buckets for an enumerated UMA histogram |
11 // and need to be synced with histograms.xml | 11 // and need to be synced with histograms.xml |
12 enum class OptInActionType : int { | 12 enum class OptInActionType : int { |
13 OPTED_OUT = 0, // Arc was opted out by user. | 13 OPTED_OUT = 0, // Arc was opted out by user. |
14 OPTED_IN = 1, // Arc was opted in by user. | 14 OPTED_IN = 1, // Arc was opted in by user. |
15 NOTIFICATION_ACCEPTED = 2, // Arc OptIn notification was accepted. | 15 NOTIFICATION_ACCEPTED = 2, // Arc OptIn notification was accepted. |
16 NOTIFICATION_DECLINED = 3, // Arc OptIn notification was declined. | 16 NOTIFICATION_DECLINED = 3, // Arc OptIn notification was declined. |
17 NOTIFICATION_TIMED_OUT = 4, // Arc OptIn notification was timed out. | 17 NOTIFICATION_TIMED_OUT = 4, // Arc OptIn notification was timed out. |
18 RETRY = 5, // User asked to retry OptIn. | 18 RETRY = 5, // User asked to retry OptIn. |
19 SIZE, // The size of this enum; keep last. | 19 SIZE, // The size of this enum; keep last. |
20 }; | 20 }; |
21 | 21 |
22 enum class OptInCancelReason { | 22 enum class OptInCancelReason { |
23 USER_CANCEL = 0, // Canceled by user. | 23 USER_CANCEL = 0, // Canceled by user. |
24 UNKNOWN_ERROR = 1, // Unclassified failure. | 24 UNKNOWN_ERROR = 1, // Unclassified failure. |
25 NETWORK_ERROR = 2, // Network failure. | 25 NETWORK_ERROR = 2, // Network failure. |
26 SERVICE_UNAVAILABLE = 3, // GMS Services are not available. | 26 SERVICE_UNAVAILABLE = 3, // GMS Services are not available. |
27 BAD_AUTHENTICATION = 4, // Bad authentication returned by server. | 27 BAD_AUTHENTICATION = 4, // Bad authentication returned by server. |
28 GMS_CORE_NOT_AVAILABLE = 5, // GMS Core is not available. | 28 GMS_CORE_NOT_AVAILABLE = 5, // GMS Core is not available. |
29 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed. | 29 CLOUD_PROVISION_FLOW_FAIL = 6, // Cloud provision flow failed. |
30 SIZE, // The size of this enum; keep last. | 30 ANDROID_MANAGEMENT_ENABLED = 7, // Android management is enabled for user. |
bartfab (slow)
2016/04/18 15:06:15
Nit 1: s/enabled/required/
Nit 2: consider s/ENABL
Polina Bondarenko
2016/04/20 13:37:45
Done.
| |
31 SIZE, // The size of this enum; keep last. | |
31 }; | 32 }; |
32 | 33 |
33 void UpdateOptInActionUMA(OptInActionType type); | 34 void UpdateOptInActionUMA(OptInActionType type); |
34 void UpdateOptInCancelUMA(OptInCancelReason reason); | 35 void UpdateOptInCancelUMA(OptInCancelReason reason); |
35 void UpdateEnabledStateUMA(bool enabled); | 36 void UpdateEnabledStateUMA(bool enabled); |
36 | 37 |
37 } // namespace arc | 38 } // namespace arc |
38 | 39 |
39 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ |
OLD | NEW |