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

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

Issue 12588002: [Autofill] Add user type metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enumerate all the cases, including the error case 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 COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_METRICS_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_METRICS_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_METRICS_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_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 // Could not determine the user's state due to failure to communicate with
71 // the Wallet server.
72 DIALOG_USER_STATE_UNKNOWN = 0,
73 // Not signed in, no verified Autofill profiles.
74 DIALOG_USER_NOT_SIGNED_IN_NO_AUTOFILL,
75 // Not signed in, has verified Autofill profiles.
76 DIALOG_USER_NOT_SIGNED_IN_HAS_AUTOFILL,
77 // Signed in, no Wallet items, no verified Autofill profiles.
78 DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL,
79 // Signed in, no Wallet items, has verified Autofill profiles.
80 DIALOG_USER_SIGNED_IN_NO_WALLET_HAS_AUTOFILL,
81 // Signed in, has Wallet items, no verified Autofill profiles.
82 DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL,
83 // Signed in, has Wallet items, has verified Autofill profiles.
84 DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL,
85 NUM_DIALOG_INITIAL_USER_STATE_METRICS
86 };
87
67 enum InfoBarMetric { 88 enum InfoBarMetric {
68 INFOBAR_SHOWN = 0, // We showed an infobar, e.g. prompting to save credit 89 INFOBAR_SHOWN = 0, // We showed an infobar, e.g. prompting to save credit
69 // card info. 90 // card info.
70 INFOBAR_ACCEPTED, // The user explicitly accepted the infobar. 91 INFOBAR_ACCEPTED, // The user explicitly accepted the infobar.
71 INFOBAR_DENIED, // The user explicitly denied the infobar. 92 INFOBAR_DENIED, // The user explicitly denied the infobar.
72 INFOBAR_IGNORED, // The user completely ignored the infobar (logged on 93 INFOBAR_IGNORED, // The user completely ignored the infobar (logged on
73 // tab close). 94 // tab close).
74 NUM_INFO_BAR_METRICS, 95 NUM_INFO_BAR_METRICS,
75 }; 96 };
76 97
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 AutofillFieldType field_type, 210 AutofillFieldType field_type,
190 const std::string& experiment_id) const; 211 const std::string& experiment_id) const;
191 212
192 virtual void LogQualityMetric(QualityMetric metric, 213 virtual void LogQualityMetric(QualityMetric metric,
193 const std::string& experiment_id) const; 214 const std::string& experiment_id) const;
194 215
195 virtual void LogServerQueryMetric(ServerQueryMetric metric) const; 216 virtual void LogServerQueryMetric(ServerQueryMetric metric) const;
196 217
197 virtual void LogUserHappinessMetric(UserHappinessMetric metric) const; 218 virtual void LogUserHappinessMetric(UserHappinessMetric metric) const;
198 219
220 // This should be called as soon as the user's signed-in status and Wallet
221 // item count is known. Records that a user starting out in |user_state| is
222 // interacting with a dialog of |dialog_type|.
223 virtual void LogDialogInitialUserState(
224 autofill::DialogType dialog_type,
225 DialogInitialUserStateMetric user_type) const;
226
199 // Logs |metric| to the security metrics histogram for |dialog_type|. 227 // Logs |metric| to the security metrics histogram for |dialog_type|.
200 virtual void LogDialogSecurityMetric(autofill::DialogType dialog_type, 228 virtual void LogDialogSecurityMetric(autofill::DialogType dialog_type,
201 DialogSecurityMetric metric) const; 229 DialogSecurityMetric metric) const;
202 230
203 // This should be called when the requestAutocomplete dialog, invoked by a 231 // This should be called when the requestAutocomplete dialog, invoked by a
204 // dialog of type |dialog_type|, is closed. |duration| should be the time 232 // dialog of type |dialog_type|, is closed. |duration| should be the time
205 // elapsed between the dialog being shown and it being closed. 233 // elapsed between the dialog being shown and it being closed.
206 // |dismissal_action| should indicate whether the user dismissed the dialog by 234 // |dismissal_action| should indicate whether the user dismissed the dialog by
207 // submitting the form data or by canceling. 235 // submitting the form data or by canceling.
208 virtual void LogDialogUiDuration( 236 virtual void LogDialogUiDuration(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 284
257 // Logs the experiment id corresponding to an upload to the server. 285 // Logs the experiment id corresponding to an upload to the server.
258 virtual void LogServerExperimentIdForUpload( 286 virtual void LogServerExperimentIdForUpload(
259 const std::string& experiment_id) const; 287 const std::string& experiment_id) const;
260 288
261 private: 289 private:
262 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics); 290 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics);
263 }; 291 };
264 292
265 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_METRICS_H_ 293 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698