Chromium Code Reviews| 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 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 // Network connection is unavailable in ARC. | 112 // Network connection is unavailable in ARC. |
| 113 NO_NETWORK_CONNECTION = 19, | 113 NO_NETWORK_CONNECTION = 19, |
| 114 | 114 |
| 115 // ARC is not enabled. | 115 // ARC is not enabled. |
| 116 ARC_DISABLED = 20, | 116 ARC_DISABLED = 20, |
| 117 | 117 |
| 118 // The size of this enum; keep last. | 118 // The size of this enum; keep last. |
| 119 SIZE, | 119 SIZE, |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 enum class AccountCheckStatus : int { | |
|
Ilya Sherman
2017/03/24 23:22:08
Please document that this enum is used to back an
khmel
2017/03/24 23:51:53
Done.
| |
| 123 // Checked account exists and is up to date. | |
| 124 UP_TO_DATE = 0, | |
| 125 | |
| 126 // Checked account is new in the system. | |
| 127 NEW = 1, | |
| 128 | |
| 129 // Checked account exists but need to be reauthorized. | |
| 130 NEED_REAUTH = 2, | |
| 131 | |
| 132 // Checked account exists but it is in unknown state. | |
| 133 UNKNOWN = 3, | |
| 134 | |
| 135 // Account check has failed. | |
| 136 CHECK_FAILED = 4, | |
| 137 | |
| 138 // The size of this enum; keep last. | |
| 139 SIZE, | |
|
dcheng
2017/03/25 00:55:04
Another possibility is to use the mojo enum throug
khmel
2017/03/25 01:24:14
This good discussion. But we already use similar m
yzshen1
2017/03/27 16:53:05
(Sorry for late reply! I didn't notice this earlie
Ilya Sherman
2017/03/27 17:00:40
FWIW, you don't have to add a new value to the moj
yzshen1
2017/03/27 17:07:46
WRT the "max + 1" approach: if "max" is not named
khmel
2017/03/27 17:17:38
Thank you for you comments! What is about includin
| |
| 140 }; | |
| 141 | |
| 122 void UpdateOptInActionUMA(OptInActionType type); | 142 void UpdateOptInActionUMA(OptInActionType type); |
| 123 void UpdateOptInCancelUMA(OptInCancelReason reason); | 143 void UpdateOptInCancelUMA(OptInCancelReason reason); |
| 124 void UpdateEnabledStateUMA(bool enabled); | 144 void UpdateEnabledStateUMA(bool enabled); |
| 125 void UpdateProvisioningResultUMA(ProvisioningResult result, bool managed); | 145 void UpdateProvisioningResultUMA(ProvisioningResult result, bool managed); |
| 126 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time, | 146 void UpdateProvisioningTiming(const base::TimeDelta& elapsed_time, |
| 127 bool success, | 147 bool success, |
| 128 bool managed); | 148 bool managed); |
| 129 void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state); | 149 void UpdateSilentAuthCodeUMA(OptInSilentAuthCode state); |
| 130 void UpdateAuthTiming(const char* histogram_name, base::TimeDelta elapsed_time); | 150 void UpdateAuthTiming(const char* histogram_name, base::TimeDelta elapsed_time); |
| 131 void UpdateAuthCheckinAttempts(int32_t num_attempts); | 151 void UpdateAuthCheckinAttempts(int32_t num_attempts); |
| 152 void UpdateAuthAccountCheckStatus(AccountCheckStatus status); | |
| 132 | 153 |
| 133 // Outputs the stringified |result| to |os|. This is only for logging purposes. | 154 // Outputs the stringified |result| to |os|. This is only for logging purposes. |
| 134 std::ostream& operator<<(std::ostream& os, const ProvisioningResult& result); | 155 std::ostream& operator<<(std::ostream& os, const ProvisioningResult& result); |
| 135 | 156 |
| 136 } // namespace arc | 157 } // namespace arc |
| 137 | 158 |
| 138 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ | 159 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_OPTIN_UMA_H_ |
| OLD | NEW |