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

Side by Side Diff: chrome/browser/autofill/autofill_metrics.h

Issue 12588002: [Autofill] Add user type metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment cleanup Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Baseline metric: The dialog was shown. 57 // Baseline metric: The dialog was shown.
58 SECURITY_METRIC_DIALOG_SHOWN = 0, 58 SECURITY_METRIC_DIALOG_SHOWN = 0,
59 // Credit card requested over non-secure protocol. 59 // Credit card requested over non-secure protocol.
60 SECURITY_METRIC_CREDIT_CARD_OVER_HTTP, 60 SECURITY_METRIC_CREDIT_CARD_OVER_HTTP,
61 // Autocomplete data requested from a frame hosted on an origin not matching 61 // Autocomplete data requested from a frame hosted on an origin not matching
62 // the main frame's origin. 62 // the main frame's origin.
63 SECURITY_METRIC_CROSS_ORIGIN_FRAME, 63 SECURITY_METRIC_CROSS_ORIGIN_FRAME,
64 NUM_DIALOG_SECURITY_METRICS 64 NUM_DIALOG_SECURITY_METRICS
65 }; 65 };
66 66
67 // The initial state of user that's interacting with a freshly shown
68 // requestAutocomplete or Autocheckout dialog.
69 enum DialogInitialUserStateMetric {
70 // User not signed in, no verified Autofill profiles.
71 DIALOG_NEW_USER_NOT_SIGNED_IN = 0,
72 // User signed in, no Wallet items, no verified Autofill profiles.
73 DIALOG_NEW_USER_SIGNED_IN,
74 // User signed in, no Wallet items, has verified Autofill profiles.
75 DIALOG_AUTOFILL_USER_SIGNED_IN,
76 // User signed in, has Wallet items.
77 DIALOG_WALLET_USER_SIGNED_IN,
78 // User not signed in, has verified Autofill profiles.
79 DIALOG_AUTOFILL_USER_NOT_SIGNED_IN,
80 NUM_DIALOG_INITIAL_USER_STATE_METRICS
81 };
82
67 enum InfoBarMetric { 83 enum InfoBarMetric {
68 INFOBAR_SHOWN = 0, // We showed an infobar, e.g. prompting to save credit 84 INFOBAR_SHOWN = 0, // We showed an infobar, e.g. prompting to save credit
69 // card info. 85 // card info.
70 INFOBAR_ACCEPTED, // The user explicitly accepted the infobar. 86 INFOBAR_ACCEPTED, // The user explicitly accepted the infobar.
71 INFOBAR_DENIED, // The user explicitly denied the infobar. 87 INFOBAR_DENIED, // The user explicitly denied the infobar.
72 INFOBAR_IGNORED, // The user completely ignored the infobar (logged on 88 INFOBAR_IGNORED, // The user completely ignored the infobar (logged on
73 // tab close). 89 // tab close).
74 NUM_INFO_BAR_METRICS, 90 NUM_INFO_BAR_METRICS,
75 }; 91 };
76 92
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // This should be called when the requestAutocomplete dialog, invoked by a 256 // This should be called when the requestAutocomplete dialog, invoked by a
241 // dialog of type |dialog_type|, is closed. |duration| should be the time 257 // dialog of type |dialog_type|, is closed. |duration| should be the time
242 // elapsed between the dialog being shown and it being closed. 258 // elapsed between the dialog being shown and it being closed.
243 // |dismissal_action| should indicate whether the user dismissed the dialog by 259 // |dismissal_action| should indicate whether the user dismissed the dialog by
244 // submitting the form data or by cancelling. 260 // submitting the form data or by cancelling.
245 virtual void LogDialogUiDuration( 261 virtual void LogDialogUiDuration(
246 const base::TimeDelta& duration, 262 const base::TimeDelta& duration,
247 autofill::DialogType dialog_type, 263 autofill::DialogType dialog_type,
248 DialogDismissalAction dismissal_action) const; 264 DialogDismissalAction dismissal_action) const;
249 265
266 // This should be called as soon as the user's signed-in status and Wallet
267 // item count is known. Records that a user starting out in |user_state| is
268 // interacting with a dialog of |dialog_type|.
269 virtual void LogDialogInitialUserState(
270 autofill::DialogType dialog_type,
271 DialogInitialUserStateMetric user_type) const;
272
250 // Logs |metric| to the Wallet errors histogram for |dialog_type|. 273 // Logs |metric| to the Wallet errors histogram for |dialog_type|.
251 virtual void LogWalletErrorMetric(autofill::DialogType dialog_type, 274 virtual void LogWalletErrorMetric(autofill::DialogType dialog_type,
252 WalletErrorMetric metric) const; 275 WalletErrorMetric metric) const;
253 276
254 // Logs |required_action| to the required actions histogram for |dialog_type|. 277 // Logs |required_action| to the required actions histogram for |dialog_type|.
255 virtual void LogWalletRequiredActionMetric( 278 virtual void LogWalletRequiredActionMetric(
256 autofill::DialogType dialog_type, 279 autofill::DialogType dialog_type,
257 WalletRequiredActionMetric required_action) const; 280 WalletRequiredActionMetric required_action) const;
258 281
259 virtual void LogAutocheckoutDuration( 282 virtual void LogAutocheckoutDuration(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 325
303 // Logs the experiment id corresponding to an upload to the server. 326 // Logs the experiment id corresponding to an upload to the server.
304 virtual void LogServerExperimentIdForUpload( 327 virtual void LogServerExperimentIdForUpload(
305 const std::string& experiment_id) const; 328 const std::string& experiment_id) const;
306 329
307 private: 330 private:
308 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics); 331 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics);
309 }; 332 };
310 333
311 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ 334 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698