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. |
| 70 [Extensible] |
| 71 enum AccountCheckStatus { |
| 72 // Checked account exists and is up to date. |
| 73 [MinVersion=9] UP_TO_DATE = 0, |
| 74 |
| 75 // Checked account is new in the system. |
| 76 [MinVersion=9] NEW = 1, |
| 77 |
| 78 // Checked account exists but need to be reauthorized. |
| 79 [MinVersion=9] NEED_REAUTH = 2, |
| 80 |
| 81 // Checked account exists but it is in unknown state. |
| 82 [MinVersion=9] UNKNOWN = 3, |
| 83 |
| 84 // Account check has failed. |
| 85 [MinVersion=9] CHECK_FAILED = 4, |
| 86 |
| 87 // NOTE: If you add any entries to this enum, you must also update the |
| 88 // corresponding UMA callsite in Chrome arc::UpdateAuthAccountCheckStatus. |
| 89 }; |
| 90 |
69 // These values describe the type of the Chrome account to provision. | 91 // These values describe the type of the Chrome account to provision. |
70 [Extensible] | 92 [Extensible] |
71 enum ChromeAccountType { | 93 enum ChromeAccountType { |
72 // Next value: 4 | 94 // Next value: 4 |
73 UNKNOWN = 0, | 95 UNKNOWN = 0, |
74 | 96 |
75 // Chrome login account type is a user account. | 97 // Chrome login account type is a user account. |
76 USER_ACCOUNT = 1, | 98 USER_ACCOUNT = 1, |
77 | 99 |
78 // Chrome login account type is a robot (service) account. | 100 // Chrome login account type is a robot (service) account. |
(...skipping 11 matching lines...) Expand all Loading... |
90 | 112 |
91 // Number of attempts to wait for Checkin task completed. 0 indicates that | 113 // Number of attempts to wait for Checkin task completed. 0 indicates that |
92 // Checkin task was already completed prior to GMS SignIn. | 114 // Checkin task was already completed prior to GMS SignIn. |
93 CHECKIN_ATTEMPTS = 1, | 115 CHECKIN_ATTEMPTS = 1, |
94 | 116 |
95 // Duration of waiting for Checkin task completed in milliseconds. | 117 // Duration of waiting for Checkin task completed in milliseconds. |
96 CHECKIN_TIME_MILLISECONDS = 2, | 118 CHECKIN_TIME_MILLISECONDS = 2, |
97 | 119 |
98 // Duration of waiting for sign-in completed in milliseconds. | 120 // Duration of waiting for sign-in completed in milliseconds. |
99 SIGNIN_TIME_MILLISECONDS = 3, | 121 SIGNIN_TIME_MILLISECONDS = 3, |
| 122 |
| 123 // Duration of checking the status of account. |
| 124 [MinVersion=9] ACCOUNT_CHECK_MILLISECONDS = 4, |
100 }; | 125 }; |
101 | 126 |
102 // The necessary information for Android to sign in and provision itself. | 127 // The necessary information for Android to sign in and provision itself. |
103 struct AccountInfo { | 128 struct AccountInfo { |
| 129 // Name of account, used to map to existing Android account. |
| 130 [MinVersion=9] string? account_name@4; |
| 131 |
104 // The authorization code that can be used in Android to sign in when | 132 // 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 | 133 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these |
106 // cases, sign-in will be skipped. | 134 // cases, sign-in will be skipped. |
107 string? auth_code@0; | 135 string? auth_code@0; |
108 | 136 |
109 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment | 137 // 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, | 138 // token for a Managed Google Play account. If it is null in this case, |
111 // sign-in will be skipped. | 139 // sign-in will be skipped. |
112 [MinVersion=6] string? enrollment_token@3; | 140 [MinVersion=6] string? enrollment_token@3; |
113 | 141 |
114 // The type of Chrome account to provision. | 142 // The type of Chrome account to provision. |
115 ChromeAccountType account_type@1; | 143 ChromeAccountType account_type@1; |
116 | 144 |
117 // Whether the account is managed from Chrome OS. | 145 // Whether the account is managed from Chrome OS. |
118 bool is_managed@2; | 146 bool is_managed@2; |
119 }; | 147 }; |
120 | 148 |
121 // Next Method ID: 9. | 149 // Next Method ID: 10. |
122 interface AuthHost { | 150 interface AuthHost { |
123 // Notifies Chrome that the sign-in is completed successfully. | 151 // Notifies Chrome that the sign-in is completed successfully. |
124 [MinVersion=2] OnSignInComplete@2(); | 152 [MinVersion=2] OnSignInComplete@2(); |
125 // Notifies Chrome that the sign-in fails to complete and provides failure | 153 // Notifies Chrome that the sign-in fails to complete and provides failure |
126 // reason. | 154 // reason. |
127 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 155 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
128 // Asynchronously requests an authorization code, as well as the account | 156 // Asynchronously requests an authorization code, as well as the account |
129 // information. | 157 // information. |
130 [MinVersion=5] RequestAccountInfo@7(); | 158 [MinVersion=5] RequestAccountInfo@7(); |
131 | 159 |
132 // Reports metrics to Chrome to be recorded in UMA. | 160 // Reports metrics to Chrome to be recorded in UMA. |
133 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); | 161 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); |
134 | 162 |
| 163 // Reports result of account check. |
| 164 [MinVersion=9] ReportAccountCheckStatus@9(AccountCheckStatus status); |
| 165 |
135 // Deprecated methods: | 166 // Deprecated methods: |
136 | 167 |
137 // Returns an authorization code, which can be used to sign in. | 168 // Returns an authorization code, which can be used to sign in. |
138 GetAuthCodeDeprecated0@0() => (string auth_code); | 169 GetAuthCodeDeprecated0@0() => (string auth_code); |
139 // Returns an authorization code in case is_enforced is set, which can be | 170 // 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. | 171 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. |
141 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, | 172 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, |
142 bool is_enforced); | 173 bool is_enforced); |
143 // Returns an authorization code and its ChromeAccountType in case | 174 // Returns an authorization code and its ChromeAccountType in case |
144 // is_enforced is set, which can be used to sign in. | 175 // is_enforced is set, which can be used to sign in. |
145 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( | 176 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( |
146 string auth_code, bool is_enforced, ChromeAccountType account_type); | 177 string auth_code, bool is_enforced, ChromeAccountType account_type); |
147 // Gets whether the account is managed from Chrome OS. | 178 // Gets whether the account is managed from Chrome OS. |
148 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); | 179 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); |
149 }; | 180 }; |
150 | 181 |
151 // Next Method ID: 2 | 182 // Next Method ID: 2 |
152 interface AuthInstance { | 183 interface AuthInstance { |
153 // Establishes full-duplex communication with the host. | 184 // Establishes full-duplex communication with the host. |
154 Init@0(AuthHost host_ptr); | 185 Init@0(AuthHost host_ptr); |
155 | 186 |
156 // Callback from RequestAccountInfo. This cannot be a normal callback since | 187 // Callback from RequestAccountInfo. This cannot be a normal callback since |
157 // the result can sometimes take a few minutes in some cases (Kiosk mode), | 188 // 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 | 189 // 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. | 190 // an arbitrarily long amount of time to interact with. |
160 // If |account_info| is null, it implies that there was an error in the | 191 // If |account_info| is null, it implies that there was an error in the |
161 // process. | 192 // process. |
162 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); | 193 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
163 }; | 194 }; |
OLD | NEW |