Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: components/arc/common/auth.mojom

Issue 2734983002: [Merge M57] arc: Handle metrics for Auth operations. (Closed)
Patch Set: fix merge conflict/manually tested with/without android changes Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_optin_uma.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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: 6 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Next value: 3 69 // Next value: 3
70 UNKNOWN = 0, 70 UNKNOWN = 0,
71 71
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 78
79 // These values describe the type of the metrics to report.
80 [Extensible]
81 enum MetricsType {
82 // Duration of waiting for network connection in milliseconds.
83 NETWORK_WAITING_TIME_MILLISECONDS = 0,
84
85 // Number of attempts to wait for Checkin task completed. 0 indicates that
86 // Checkin task was already completed prior to GMS SignIn.
87 CHECKIN_ATTEMPTS = 1,
88
89 // Duration of waiting for Checkin task completed in milliseconds.
90 CHECKIN_TIME_MILLISECONDS = 2,
91
92 // Duration of waiting for sign-in completed in milliseconds.
93 SIGNIN_TIME_MILLISECONDS = 3,
94 };
95
79 // The necessary information for Android to sign in and provision itself. 96 // The necessary information for Android to sign in and provision itself.
80 struct AccountInfo { 97 struct AccountInfo {
81 // The authorization code that can be used in Android to sign in. If it is 98 // The authorization code that can be used in Android to sign in. If it is
82 // null, sign-in will be skipped. 99 // null, sign-in will be skipped.
83 string? auth_code; 100 string? auth_code;
84 101
85 // The type of Chrome account to provision. 102 // The type of Chrome account to provision.
86 ChromeAccountType account_type; 103 ChromeAccountType account_type;
87 104
88 // Whether the account is managed from Chrome OS. 105 // Whether the account is managed from Chrome OS.
89 bool is_managed; 106 bool is_managed;
90 }; 107 };
91 108
92 // Next Method ID: 7. 109 // Next Method ID: 9.
93 interface AuthHost { 110 interface AuthHost {
94 // Notifies Chrome that the sign-in is completed successfully. 111 // Notifies Chrome that the sign-in is completed successfully.
95 [MinVersion=2] OnSignInComplete@2(); 112 [MinVersion=2] OnSignInComplete@2();
96 // Notifies Chrome that the sign-in fails to complete and provides failure 113 // Notifies Chrome that the sign-in fails to complete and provides failure
97 // reason. 114 // reason.
98 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); 115 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason);
99 // Asynchronously requests an authorization code, as well as the account 116 // Asynchronously requests an authorization code, as well as the account
100 // information. 117 // information.
101 [MinVersion=5] RequestAccountInfo@7(); 118 [MinVersion=5] RequestAccountInfo@7();
102 119
120 // Reports metrics to Chrome to be recorded in UMA.
121 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value);
122
103 // Deprecated methods: 123 // Deprecated methods:
104 124
105 // Returns an authorization code, which can be used to sign in. 125 // Returns an authorization code, which can be used to sign in.
106 GetAuthCodeDeprecated0@0() => (string auth_code); 126 GetAuthCodeDeprecated0@0() => (string auth_code);
107 // Returns an authorization code in case is_enforced is set, which can be 127 // Returns an authorization code in case is_enforced is set, which can be
108 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. 128 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT.
109 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, 129 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code,
110 bool is_enforced); 130 bool is_enforced);
111 // Returns an authorization code and its ChromeAccountType in case 131 // Returns an authorization code and its ChromeAccountType in case
112 // is_enforced is set, which can be used to sign in. 132 // is_enforced is set, which can be used to sign in.
113 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( 133 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => (
114 string auth_code, bool is_enforced, ChromeAccountType account_type); 134 string auth_code, bool is_enforced, ChromeAccountType account_type);
115 // Gets whether the account is managed from Chrome OS. 135 // Gets whether the account is managed from Chrome OS.
116 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); 136 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed);
117 }; 137 };
118 138
119 // Next Method ID: 2 139 // Next Method ID: 2
120 interface AuthInstance { 140 interface AuthInstance {
121 // Establishes full-duplex communication with the host. 141 // Establishes full-duplex communication with the host.
122 Init@0(AuthHost host_ptr); 142 Init@0(AuthHost host_ptr);
123 143
124 // Callback from RequestAccountInfo. This cannot be a normal callback since 144 // Callback from RequestAccountInfo. This cannot be a normal callback since
125 // the result can sometimes take a few minutes in some cases (Kiosk mode), 145 // the result can sometimes take a few minutes in some cases (Kiosk mode),
126 // and in other cases there is a UI that the user is shown and they can take 146 // and in other cases there is a UI that the user is shown and they can take
127 // an arbitrarily long amount of time to interact with. 147 // an arbitrarily long amount of time to interact with.
128 // If |account_info| is null, it implies that there was an error in the 148 // If |account_info| is null, it implies that there was an error in the
129 // process. 149 // process.
130 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); 150 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info);
131 }; 151 };
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_optin_uma.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698