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.mojom; | 5 module arc.mojom; |
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 { |
Luis Héctor Chávez
2016/07/28 17:16:40
This is going to fail validation (and thus cause a
hidehiko
2016/07/28 17:41:37
Thank you for pointing this out.
How about adding
Luis Héctor Chávez
2016/07/28 17:45:41
That should be done regardless.
hidehiko
2016/07/29 04:25:42
Done.
| |
9 // Negative values are reserved for internal use. | |
10 // The values are shuffled to keep the backward compatibility. | |
11 // Next value: 15. | |
9 UNKNOWN_ERROR = 0, | 12 UNKNOWN_ERROR = 0, |
10 NETWORK_ERROR = 1, | 13 |
11 SERVICE_UNAVAILABLE = 2, | 14 // Mojo errors: |
12 BAD_AUTHENTICATION = 3, | 15 // MOJO_VERSION_MISMATCH: is sent when an API is not supported |
13 GMS_CORE_NOT_AVAILABLE = 4, | 16 // due to Host/Instance version mismatch. |
14 CLOUD_PROVISION_FLOW_FAIL = 5, | 17 // MOJO_CALL_TIMEOUT: is sent when a Mojo invocation is started |
18 // but not completed with time out. | |
19 MOJO_VERSION_MISMATCH = 6, | |
20 MOJO_CALL_TIMEOUT = 7, | |
21 | |
22 // Device check-in errors: | |
23 // DEVICE_CHECK_IN_FAILED: is sent when "check-in" procedure is completed | |
24 // but is actually failed. | |
25 // DEVICE_CHECK_IN_TIMEOUT: is sent when "check-in" procedure started | |
26 // but is not completed. | |
27 // DEVICE_CHECK_IN_INTERNAL_ERROR: is sent when "check-in" procedure is | |
28 // started, but some unexpected error situation happens so that it could | |
29 // not completed. | |
30 DEVICE_CHECK_IN_FAILED = 4, | |
31 DEVICE_CHECK_IN_TIMEOUT = 8, | |
32 DEVICE_CHECK_IN_INTERNAL_ERROR = 9, | |
33 | |
34 // GMS errors: | |
35 // GMS_NETWORK_ERROR: is sent when GMS sign-in procedure is started, but | |
36 // it reports NETWORK_ERROR. | |
37 // GMS_SERVICE_UNAVAILABLE: is sent when GMS sign-in procedure is started | |
38 // but it reports SERVICE_UNAVAILABLE. Note that this is not generic | |
39 // service unavailable error code. | |
40 // GMS_BAD_AUTHENTICATION: is sent when GMS sign-in procedure is started | |
41 // but it reports BAD_AUTHENTICATION. | |
42 // GMS_SIGN_IN_FAILED: is sent when GMS sign in procedure is started but | |
43 // it reports an error other than above NETWORK_ERROR, SERVICE_UNAVAILABLE | |
44 // or BAD_AUTHENTICATION. In general, we do not expect this kind of cases. | |
45 // GMS_SIGN_IN_TIMEOUT: is sent when GMS sign in procedure is started but | |
46 // not returned. | |
47 // GMS_SIGN_IN_INTERNAL_ERROR: is sent when GMS sign in procedure is started | |
48 // but could not completed. | |
49 GMS_NETWORK_ERROR = 1, | |
50 GMS_SERVICE_UNAVAILABLE = 2, | |
51 GMS_BAD_AUTHENTICATION = 3, | |
52 GMS_SIGN_IN_FAILED = 10, | |
53 GMS_SIGN_IN_TIMEOUT = 11, | |
54 GMS_SIGN_IN_INTERNAL_ERROR = 12, | |
55 | |
56 // Cloud provisioning errors. | |
57 CLOUD_PROVISION_FLOW_FAILED = 5, | |
58 CLOUD_PROVISION_FLOW_TIMEOUT = 13, | |
59 CLOUD_PROVISION_FLOW_INTERNAL_ERROR = 14, | |
15 }; | 60 }; |
16 | 61 |
17 interface AuthHost { | 62 interface AuthHost { |
18 // Returns an authorization code, which can be used to sign in. | 63 // Returns an authorization code, which can be used to sign in. |
19 GetAuthCodeDeprecated@0() => (string auth_code); | 64 GetAuthCodeDeprecated@0() => (string auth_code); |
20 // Returns an authorization code in case is_enforced is set, which can be used | 65 // Returns an authorization code in case is_enforced is set, which can be used |
21 // to sign in. | 66 // to sign in. |
22 [MinVersion=1] GetAuthCode@1() => (string auth_code, bool is_enforced); | 67 [MinVersion=1] GetAuthCode@1() => (string auth_code, bool is_enforced); |
23 // Gets whether the account is managed from Chrome OS. | 68 // Gets whether the account is managed from Chrome OS. |
24 [MinVersion=3] GetIsAccountManaged@4() => (bool is_managed); | 69 [MinVersion=3] GetIsAccountManaged@4() => (bool is_managed); |
25 // Notifies Chrome that the sign-in is completed successfully. | 70 // Notifies Chrome that the sign-in is completed successfully. |
26 [MinVersion=2] OnSignInComplete@2(); | 71 [MinVersion=2] OnSignInComplete@2(); |
27 // Notifies Chrome that the sign-in fails to complete and provides failure | 72 // Notifies Chrome that the sign-in fails to complete and provides failure |
28 // reason. | 73 // reason. |
29 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 74 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
30 }; | 75 }; |
31 | 76 |
32 interface AuthInstance { | 77 interface AuthInstance { |
33 // Establishes full-duplex communication with the host. | 78 // Establishes full-duplex communication with the host. |
34 Init@0(AuthHost host_ptr); | 79 Init@0(AuthHost host_ptr); |
35 }; | 80 }; |
OLD | NEW |