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 module arc; | 5 module arc; |
6 | 6 |
7 // These values describe failure reason of sign-in. | 7 // These values describe failure reason of sign-in. |
8 enum ArcSignInFailureReason { | 8 enum ArcSignInFailureReason { |
9 UNKNOWN_ERROR = 0, | 9 UNKNOWN_ERROR = 0, |
10 NETWORK_ERROR = 1, | 10 NETWORK_ERROR = 1, |
11 SERVICE_UNAVAILABLE = 2, | 11 SERVICE_UNAVAILABLE = 2, |
12 BAD_AUTHENTICATION = 3, | 12 BAD_AUTHENTICATION = 3, |
13 GMS_CORE_NOT_AVAILABLE = 4, | 13 GMS_CORE_NOT_AVAILABLE = 4, |
14 CLOUD_PROVISION_FLOW_FAIL = 5, | 14 CLOUD_PROVISION_FLOW_FAIL = 5, |
15 }; | 15 }; |
16 | 16 |
17 interface AuthHost { | 17 interface AuthHost { |
18 // Returns an authorization code, which can be used to sign in. | 18 // Returns an authorization code, which can be used to sign in. |
19 GetAuthCodeDeprecated@0() => (string auth_code); | 19 GetAuthCodeDeprecated@0() => (string auth_code); |
20 // Returns an authorization code in case is_enforced is set, which can be used | 20 // Returns an authorization code in case is_enforced is set, which can be used |
21 // to sign in. | 21 // to sign in. |
22 [MinVersion=1] GetAuthCode@1() => (string auth_code, bool is_enforced); | 22 [MinVersion=1] GetAuthCode@1() => (string auth_code, bool is_enforced); |
23 // Notifies Chrome that the sign-in is completed successfully. | 23 // Notifies Chrome that the sign-in is completed successfully. |
24 [MinVersion=2] OnSignInComplete@2(); | 24 [MinVersion=2] OnSignInComplete@2(); |
25 // Notifies Chrome that the sign-in fails to complete and provides failure | 25 // Notifies Chrome that the sign-in fails to complete and provides failure |
26 // reason. | 26 // reason. |
27 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 27 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
28 // Gets whether the account is managed from Chrome OS. | |
29 [MinVersion=3] GetIsAccountManaged@4() => (bool is_managed); | |
Luis Héctor Chávez
2016/03/17 15:57:49
nit: Sort lexicographically by method name.
phweiss
2016/03/17 16:07:40
Done.
| |
28 }; | 30 }; |
29 | 31 |
30 interface AuthInstance { | 32 interface AuthInstance { |
31 // Establishes full-duplex communication with the host. | 33 // Establishes full-duplex communication with the host. |
32 Init(AuthHost host_ptr); | 34 Init(AuthHost host_ptr); |
33 }; | 35 }; |
OLD | NEW |