Chromium Code Reviews| 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: 8 | 5 // Next MinVersion: 9 |
| 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: 15. | 15 // Next value: 16. |
| 16 UNKNOWN_ERROR = 0, | 16 UNKNOWN_ERROR = 0, |
| 17 | 17 |
| 18 // Mojo errors: | 18 // Mojo errors: |
| 19 // MOJO_VERSION_MISMATCH: is sent when an API is not supported | 19 // MOJO_VERSION_MISMATCH: is sent when an API is not supported |
| 20 // due to Host/Instance version mismatch. | 20 // due to Host/Instance version mismatch. |
| 21 // MOJO_CALL_TIMEOUT: is sent when a Mojo invocation is started | 21 // MOJO_CALL_TIMEOUT: is sent when a Mojo invocation is started |
| 22 // but not completed with time out. | 22 // but not completed with time out. |
| 23 MOJO_VERSION_MISMATCH = 6, | 23 MOJO_VERSION_MISMATCH = 6, |
| 24 MOJO_CALL_TIMEOUT = 7, | 24 MOJO_CALL_TIMEOUT = 7, |
| 25 | 25 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 54 GMS_SERVICE_UNAVAILABLE = 2, | 54 GMS_SERVICE_UNAVAILABLE = 2, |
| 55 GMS_BAD_AUTHENTICATION = 3, | 55 GMS_BAD_AUTHENTICATION = 3, |
| 56 GMS_SIGN_IN_FAILED = 10, | 56 GMS_SIGN_IN_FAILED = 10, |
| 57 GMS_SIGN_IN_TIMEOUT = 11, | 57 GMS_SIGN_IN_TIMEOUT = 11, |
| 58 GMS_SIGN_IN_INTERNAL_ERROR = 12, | 58 GMS_SIGN_IN_INTERNAL_ERROR = 12, |
| 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 | |
| 65 // Network connection is unavailable. | |
| 66 [MinVersion=8] NO_NETWORK_CONNECTION = 15, | |
|
khmel
2017/03/01 20:39:09
[MinVersion=8] in enum is not sufficient to uprev
Yusuke Sato
2017/03/01 20:57:10
What happens if you send NO_NETWORK_CONNECTION to
Luis Héctor Chávez
2017/03/01 21:00:06
I'm also slightly against adding the dummy functio
khmel
2017/03/01 21:33:06
Personally I also consider this as minor part but
| |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 // These values describe the type of the Chrome account to provision. | 69 // These values describe the type of the Chrome account to provision. |
| 67 [Extensible] | 70 [Extensible] |
| 68 enum ChromeAccountType { | 71 enum ChromeAccountType { |
| 69 // Next value: 4 | 72 // Next value: 4 |
| 70 UNKNOWN = 0, | 73 UNKNOWN = 0, |
| 71 | 74 |
| 72 // Chrome login account type is a user account. | 75 // Chrome login account type is a user account. |
| 73 USER_ACCOUNT = 1, | 76 USER_ACCOUNT = 1, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 // sign-in will be skipped. | 111 // sign-in will be skipped. |
| 109 [MinVersion=6] string? enrollment_token@3; | 112 [MinVersion=6] string? enrollment_token@3; |
| 110 | 113 |
| 111 // The type of Chrome account to provision. | 114 // The type of Chrome account to provision. |
| 112 ChromeAccountType account_type@1; | 115 ChromeAccountType account_type@1; |
| 113 | 116 |
| 114 // Whether the account is managed from Chrome OS. | 117 // Whether the account is managed from Chrome OS. |
| 115 bool is_managed@2; | 118 bool is_managed@2; |
| 116 }; | 119 }; |
| 117 | 120 |
| 118 // Next Method ID: 9. | 121 // Next Method ID: 10. |
| 119 interface AuthHost { | 122 interface AuthHost { |
| 120 // Notifies Chrome that the sign-in is completed successfully. | 123 // Notifies Chrome that the sign-in is completed successfully. |
| 121 [MinVersion=2] OnSignInComplete@2(); | 124 [MinVersion=2] OnSignInComplete@2(); |
| 122 // Notifies Chrome that the sign-in fails to complete and provides failure | 125 // Notifies Chrome that the sign-in fails to complete and provides failure |
| 123 // reason. | 126 // reason. |
| 124 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 127 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
| 125 // Asynchronously requests an authorization code, as well as the account | 128 // Asynchronously requests an authorization code, as well as the account |
| 126 // information. | 129 // information. |
| 127 [MinVersion=5] RequestAccountInfo@7(); | 130 [MinVersion=5] RequestAccountInfo@7(); |
| 128 | 131 |
| 129 // Reports metrics to Chrome to be recorded in UMA. | 132 // Reports metrics to Chrome to be recorded in UMA. |
| 130 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); | 133 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); |
| 131 | 134 |
| 135 // Dummy method to force update mojom version. [MinVersion=8] in enum | |
| 136 // ArcSignInFailureReasonhas has no effect. | |
| 137 [MinVersion=8] Dummy@9(); | |
|
Yusuke Sato
2017/03/01 20:57:10
Please move this to line 123 to lexicographically
khmel
2017/03/01 21:33:06
Good point, however deprecated :)
| |
| 138 | |
| 132 // Deprecated methods: | 139 // Deprecated methods: |
| 133 | 140 |
| 134 // Returns an authorization code, which can be used to sign in. | 141 // Returns an authorization code, which can be used to sign in. |
| 135 GetAuthCodeDeprecated0@0() => (string auth_code); | 142 GetAuthCodeDeprecated0@0() => (string auth_code); |
| 136 // Returns an authorization code in case is_enforced is set, which can be | 143 // Returns an authorization code in case is_enforced is set, which can be |
| 137 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. | 144 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. |
| 138 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, | 145 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, |
| 139 bool is_enforced); | 146 bool is_enforced); |
| 140 // Returns an authorization code and its ChromeAccountType in case | 147 // Returns an authorization code and its ChromeAccountType in case |
| 141 // is_enforced is set, which can be used to sign in. | 148 // is_enforced is set, which can be used to sign in. |
| 142 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( | 149 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( |
| 143 string auth_code, bool is_enforced, ChromeAccountType account_type); | 150 string auth_code, bool is_enforced, ChromeAccountType account_type); |
| 144 // Gets whether the account is managed from Chrome OS. | 151 // Gets whether the account is managed from Chrome OS. |
| 145 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); | 152 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); |
| 146 }; | 153 }; |
| 147 | 154 |
| 148 // Next Method ID: 2 | 155 // Next Method ID: 2 |
| 149 interface AuthInstance { | 156 interface AuthInstance { |
| 150 // Establishes full-duplex communication with the host. | 157 // Establishes full-duplex communication with the host. |
| 151 Init@0(AuthHost host_ptr); | 158 Init@0(AuthHost host_ptr); |
| 152 | 159 |
| 153 // Callback from RequestAccountInfo. This cannot be a normal callback since | 160 // Callback from RequestAccountInfo. This cannot be a normal callback since |
| 154 // the result can sometimes take a few minutes in some cases (Kiosk mode), | 161 // the result can sometimes take a few minutes in some cases (Kiosk mode), |
| 155 // and in other cases there is a UI that the user is shown and they can take | 162 // and in other cases there is a UI that the user is shown and they can take |
| 156 // an arbitrarily long amount of time to interact with. | 163 // an arbitrarily long amount of time to interact with. |
| 157 // If |account_info| is null, it implies that there was an error in the | 164 // If |account_info| is null, it implies that there was an error in the |
| 158 // process. | 165 // process. |
| 159 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); | 166 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
| 160 }; | 167 }; |
| OLD | NEW |