| 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: 7 | 5 // Next MinVersion: 8 |
| 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: 15. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Chrome login account type is a user account. | 72 // Chrome login account type is a user account. |
| 73 USER_ACCOUNT = 1, | 73 USER_ACCOUNT = 1, |
| 74 | 74 |
| 75 // Chrome login account type is a robot (service) account. | 75 // Chrome login account type is a robot (service) account. |
| 76 ROBOT_ACCOUNT = 2, | 76 ROBOT_ACCOUNT = 2, |
| 77 | 77 |
| 78 // Chrome login account type is an Active Directory account. | 78 // Chrome login account type is an Active Directory account. |
| 79 ACTIVE_DIRECTORY_ACCOUNT = 3, | 79 ACTIVE_DIRECTORY_ACCOUNT = 3, |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 // These values describe the type of the metrics to report. |
| 83 [Extensible] |
| 84 enum MetricsType { |
| 85 // Duration of waiting for network connection in milliseconds. |
| 86 NETWORK_WAITING_TIME_MILLISECONDS = 0, |
| 87 |
| 88 // Number of attempts to wait for Checkin task completed. 0 indicates that |
| 89 // Checkin task was already completed prior to GMS SignIn. |
| 90 CHECKIN_ATTEMPTS = 1, |
| 91 |
| 92 // Duration of waiting for Checkin task completed in milliseconds. |
| 93 CHECKIN_TIME_MILLISECONDS = 2, |
| 94 |
| 95 // Duration of waiting for sign-in completed in milliseconds. |
| 96 SIGNIN_TIME_MILLISECONDS = 3, |
| 97 }; |
| 98 |
| 82 // The necessary information for Android to sign in and provision itself. | 99 // The necessary information for Android to sign in and provision itself. |
| 83 struct AccountInfo { | 100 struct AccountInfo { |
| 84 // The authorization code that can be used in Android to sign in when | 101 // The authorization code that can be used in Android to sign in when |
| 85 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these | 102 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these |
| 86 // cases, sign-in will be skipped. | 103 // cases, sign-in will be skipped. |
| 87 string? auth_code@0; | 104 string? auth_code@0; |
| 88 | 105 |
| 89 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment | 106 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment |
| 90 // token for a Managed Google Play account. If it is null in this case, | 107 // token for a Managed Google Play account. If it is null in this case, |
| 91 // sign-in will be skipped. | 108 // sign-in will be skipped. |
| 92 [MinVersion=6] string? enrollment_token@3; | 109 [MinVersion=6] string? enrollment_token@3; |
| 93 | 110 |
| 94 // The type of Chrome account to provision. | 111 // The type of Chrome account to provision. |
| 95 ChromeAccountType account_type@1; | 112 ChromeAccountType account_type@1; |
| 96 | 113 |
| 97 // Whether the account is managed from Chrome OS. | 114 // Whether the account is managed from Chrome OS. |
| 98 bool is_managed@2; | 115 bool is_managed@2; |
| 99 }; | 116 }; |
| 100 | 117 |
| 101 // Next Method ID: 7. | 118 // Next Method ID: 9. |
| 102 interface AuthHost { | 119 interface AuthHost { |
| 103 // Notifies Chrome that the sign-in is completed successfully. | 120 // Notifies Chrome that the sign-in is completed successfully. |
| 104 [MinVersion=2] OnSignInComplete@2(); | 121 [MinVersion=2] OnSignInComplete@2(); |
| 105 // Notifies Chrome that the sign-in fails to complete and provides failure | 122 // Notifies Chrome that the sign-in fails to complete and provides failure |
| 106 // reason. | 123 // reason. |
| 107 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 124 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
| 108 // Asynchronously requests an authorization code, as well as the account | 125 // Asynchronously requests an authorization code, as well as the account |
| 109 // information. | 126 // information. |
| 110 [MinVersion=5] RequestAccountInfo@7(); | 127 [MinVersion=5] RequestAccountInfo@7(); |
| 111 | 128 |
| 129 // Reports metrics to Chrome to be recorded in UMA. |
| 130 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); |
| 131 |
| 112 // Deprecated methods: | 132 // Deprecated methods: |
| 113 | 133 |
| 114 // Returns an authorization code, which can be used to sign in. | 134 // Returns an authorization code, which can be used to sign in. |
| 115 GetAuthCodeDeprecated0@0() => (string auth_code); | 135 GetAuthCodeDeprecated0@0() => (string auth_code); |
| 116 // Returns an authorization code in case is_enforced is set, which can be | 136 // Returns an authorization code in case is_enforced is set, which can be |
| 117 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. | 137 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. |
| 118 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, | 138 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, |
| 119 bool is_enforced); | 139 bool is_enforced); |
| 120 // Returns an authorization code and its ChromeAccountType in case | 140 // Returns an authorization code and its ChromeAccountType in case |
| 121 // is_enforced is set, which can be used to sign in. | 141 // is_enforced is set, which can be used to sign in. |
| 122 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( | 142 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( |
| 123 string auth_code, bool is_enforced, ChromeAccountType account_type); | 143 string auth_code, bool is_enforced, ChromeAccountType account_type); |
| 124 // Gets whether the account is managed from Chrome OS. | 144 // Gets whether the account is managed from Chrome OS. |
| 125 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); | 145 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); |
| 126 }; | 146 }; |
| 127 | 147 |
| 128 // Next Method ID: 2 | 148 // Next Method ID: 2 |
| 129 interface AuthInstance { | 149 interface AuthInstance { |
| 130 // Establishes full-duplex communication with the host. | 150 // Establishes full-duplex communication with the host. |
| 131 Init@0(AuthHost host_ptr); | 151 Init@0(AuthHost host_ptr); |
| 132 | 152 |
| 133 // Callback from RequestAccountInfo. This cannot be a normal callback since | 153 // Callback from RequestAccountInfo. This cannot be a normal callback since |
| 134 // the result can sometimes take a few minutes in some cases (Kiosk mode), | 154 // the result can sometimes take a few minutes in some cases (Kiosk mode), |
| 135 // and in other cases there is a UI that the user is shown and they can take | 155 // and in other cases there is a UI that the user is shown and they can take |
| 136 // an arbitrarily long amount of time to interact with. | 156 // an arbitrarily long amount of time to interact with. |
| 137 // If |account_info| is null, it implies that there was an error in the | 157 // If |account_info| is null, it implies that there was an error in the |
| 138 // process. | 158 // process. |
| 139 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); | 159 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
| 140 }; | 160 }; |
| OLD | NEW |