OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Next MinVersion: 9 | 5 // Next MinVersion: 10 |
6 | 6 |
7 module arc.mojom; | 7 module arc.mojom; |
8 | 8 |
9 // These values describe failure reason of sign-in. | 9 // These values describe failure reason of sign-in. |
10 [Extensible] | 10 [Extensible] |
11 enum ArcSignInFailureReason { | 11 enum ArcSignInFailureReason { |
12 // Negative values are reserved for internal use. | 12 // Negative values are reserved for internal use. |
13 // The values are shuffled to keep the backward compatibility and don't match | 13 // The values are shuffled to keep the backward compatibility and don't match |
14 // ProvisioningResult in arc_optin_uma.h | 14 // ProvisioningResult in arc_optin_uma.h |
15 // Next value: 16. | 15 // Next value: 16. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 | 59 |
60 // Cloud provisioning errors. | 60 // Cloud provisioning errors. |
61 CLOUD_PROVISION_FLOW_FAILED = 5, | 61 CLOUD_PROVISION_FLOW_FAILED = 5, |
62 CLOUD_PROVISION_FLOW_TIMEOUT = 13, | 62 CLOUD_PROVISION_FLOW_TIMEOUT = 13, |
63 CLOUD_PROVISION_FLOW_INTERNAL_ERROR = 14, | 63 CLOUD_PROVISION_FLOW_INTERNAL_ERROR = 14, |
64 | 64 |
65 // Network connection is unavailable. | 65 // Network connection is unavailable. |
66 [MinVersion=8] NO_NETWORK_CONNECTION = 15, | 66 [MinVersion=8] NO_NETWORK_CONNECTION = 15, |
67 }; | 67 }; |
68 | 68 |
69 // These values describe account check status. In case extending this enum you | |
70 // have to update UMA reporting in Chrome. See | |
Ilya Sherman
2017/03/27 19:03:28
nit: I'd phrase the second sentence as something l
khmel
2017/03/27 19:29:29
Makes sense, thanks!
| |
71 // arc::UpdateAuthAccountCheckStatus. | |
72 [Extensible] | |
73 enum AccountCheckStatus { | |
74 // Checked account exists and is up to date. | |
75 [MinVersion=9] UP_TO_DATE = 0, | |
76 | |
77 // Checked account is new in the system. | |
78 [MinVersion=9] NEW = 1, | |
79 | |
80 // Checked account exists but need to be reauthorized. | |
81 [MinVersion=9] NEED_REAUTH = 2, | |
82 | |
83 // Checked account exists but it is in unknown state. | |
84 [MinVersion=9] UNKNOWN = 3, | |
85 | |
86 // Account check has failed. | |
87 [MinVersion=9] CHECK_FAILED = 4, | |
88 }; | |
89 | |
69 // These values describe the type of the Chrome account to provision. | 90 // These values describe the type of the Chrome account to provision. |
70 [Extensible] | 91 [Extensible] |
71 enum ChromeAccountType { | 92 enum ChromeAccountType { |
72 // Next value: 4 | 93 // Next value: 4 |
73 UNKNOWN = 0, | 94 UNKNOWN = 0, |
74 | 95 |
75 // Chrome login account type is a user account. | 96 // Chrome login account type is a user account. |
76 USER_ACCOUNT = 1, | 97 USER_ACCOUNT = 1, |
77 | 98 |
78 // Chrome login account type is a robot (service) account. | 99 // Chrome login account type is a robot (service) account. |
(...skipping 11 matching lines...) Expand all Loading... | |
90 | 111 |
91 // Number of attempts to wait for Checkin task completed. 0 indicates that | 112 // Number of attempts to wait for Checkin task completed. 0 indicates that |
92 // Checkin task was already completed prior to GMS SignIn. | 113 // Checkin task was already completed prior to GMS SignIn. |
93 CHECKIN_ATTEMPTS = 1, | 114 CHECKIN_ATTEMPTS = 1, |
94 | 115 |
95 // Duration of waiting for Checkin task completed in milliseconds. | 116 // Duration of waiting for Checkin task completed in milliseconds. |
96 CHECKIN_TIME_MILLISECONDS = 2, | 117 CHECKIN_TIME_MILLISECONDS = 2, |
97 | 118 |
98 // Duration of waiting for sign-in completed in milliseconds. | 119 // Duration of waiting for sign-in completed in milliseconds. |
99 SIGNIN_TIME_MILLISECONDS = 3, | 120 SIGNIN_TIME_MILLISECONDS = 3, |
121 | |
122 // Duration of checking the status of account. | |
123 [MinVersion=9] ACCOUNT_CHECK_MILLISECONDS = 4, | |
100 }; | 124 }; |
101 | 125 |
102 // The necessary information for Android to sign in and provision itself. | 126 // The necessary information for Android to sign in and provision itself. |
103 struct AccountInfo { | 127 struct AccountInfo { |
128 // Name of account, used to map to existing Android account. | |
129 [MinVersion=9] string? account_name@4; | |
130 | |
104 // The authorization code that can be used in Android to sign in when | 131 // The authorization code that can be used in Android to sign in when |
105 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these | 132 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these |
106 // cases, sign-in will be skipped. | 133 // cases, sign-in will be skipped. |
107 string? auth_code@0; | 134 string? auth_code@0; |
108 | 135 |
109 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment | 136 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment |
110 // token for a Managed Google Play account. If it is null in this case, | 137 // token for a Managed Google Play account. If it is null in this case, |
111 // sign-in will be skipped. | 138 // sign-in will be skipped. |
112 [MinVersion=6] string? enrollment_token@3; | 139 [MinVersion=6] string? enrollment_token@3; |
113 | 140 |
114 // The type of Chrome account to provision. | 141 // The type of Chrome account to provision. |
115 ChromeAccountType account_type@1; | 142 ChromeAccountType account_type@1; |
116 | 143 |
117 // Whether the account is managed from Chrome OS. | 144 // Whether the account is managed from Chrome OS. |
118 bool is_managed@2; | 145 bool is_managed@2; |
119 }; | 146 }; |
120 | 147 |
121 // Next Method ID: 9. | 148 // Next Method ID: 10. |
122 interface AuthHost { | 149 interface AuthHost { |
123 // Notifies Chrome that the sign-in is completed successfully. | 150 // Notifies Chrome that the sign-in is completed successfully. |
124 [MinVersion=2] OnSignInComplete@2(); | 151 [MinVersion=2] OnSignInComplete@2(); |
125 // Notifies Chrome that the sign-in fails to complete and provides failure | 152 // Notifies Chrome that the sign-in fails to complete and provides failure |
126 // reason. | 153 // reason. |
127 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 154 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
128 // Asynchronously requests an authorization code, as well as the account | 155 // Asynchronously requests an authorization code, as well as the account |
129 // information. | 156 // information. |
130 [MinVersion=5] RequestAccountInfo@7(); | 157 [MinVersion=5] RequestAccountInfo@7(); |
131 | 158 |
132 // Reports metrics to Chrome to be recorded in UMA. | 159 // Reports metrics to Chrome to be recorded in UMA. |
133 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); | 160 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); |
134 | 161 |
162 // Reports result of account check. | |
163 [MinVersion=9] ReportAccountCheckStatus@9(AccountCheckStatus status); | |
164 | |
135 // Deprecated methods: | 165 // Deprecated methods: |
136 | 166 |
137 // Returns an authorization code, which can be used to sign in. | 167 // Returns an authorization code, which can be used to sign in. |
138 GetAuthCodeDeprecated0@0() => (string auth_code); | 168 GetAuthCodeDeprecated0@0() => (string auth_code); |
139 // Returns an authorization code in case is_enforced is set, which can be | 169 // Returns an authorization code in case is_enforced is set, which can be |
140 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. | 170 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. |
141 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, | 171 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, |
142 bool is_enforced); | 172 bool is_enforced); |
143 // Returns an authorization code and its ChromeAccountType in case | 173 // Returns an authorization code and its ChromeAccountType in case |
144 // is_enforced is set, which can be used to sign in. | 174 // is_enforced is set, which can be used to sign in. |
145 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( | 175 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( |
146 string auth_code, bool is_enforced, ChromeAccountType account_type); | 176 string auth_code, bool is_enforced, ChromeAccountType account_type); |
147 // Gets whether the account is managed from Chrome OS. | 177 // Gets whether the account is managed from Chrome OS. |
148 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); | 178 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); |
149 }; | 179 }; |
150 | 180 |
151 // Next Method ID: 2 | 181 // Next Method ID: 2 |
152 interface AuthInstance { | 182 interface AuthInstance { |
153 // Establishes full-duplex communication with the host. | 183 // Establishes full-duplex communication with the host. |
154 Init@0(AuthHost host_ptr); | 184 Init@0(AuthHost host_ptr); |
155 | 185 |
156 // Callback from RequestAccountInfo. This cannot be a normal callback since | 186 // Callback from RequestAccountInfo. This cannot be a normal callback since |
157 // the result can sometimes take a few minutes in some cases (Kiosk mode), | 187 // the result can sometimes take a few minutes in some cases (Kiosk mode), |
158 // and in other cases there is a UI that the user is shown and they can take | 188 // and in other cases there is a UI that the user is shown and they can take |
159 // an arbitrarily long amount of time to interact with. | 189 // an arbitrarily long amount of time to interact with. |
160 // If |account_info| is null, it implies that there was an error in the | 190 // If |account_info| is null, it implies that there was an error in the |
161 // process. | 191 // process. |
162 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); | 192 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
163 }; | 193 }; |
OLD | NEW |