Chromium Code Reviews| Index: chrome/browser/autofill/autofill_metrics.h |
| diff --git a/chrome/browser/autofill/autofill_metrics.h b/chrome/browser/autofill/autofill_metrics.h |
| index 22bd74b9d38a068df69e5da41f6768113563b658..80457b09d9802115bb54fd0afc46ce2ebb5ad953 100644 |
| --- a/chrome/browser/autofill/autofill_metrics.h |
| +++ b/chrome/browser/autofill/autofill_metrics.h |
| @@ -79,6 +79,40 @@ class AutofillMetrics { |
| NUM_SERVER_QUERY_METRICS |
| }; |
| + // Each of these metrics is logged only for potentially autofillable forms, |
| + // i.e. forms with at least three fields, etc. |
| + // These are used to derive certain "user happiness" metrics. For example, we |
| + // can compute the ratio (USER_DID_EDIT_AUTOFILLED_FIELD / USER_DID_AUTOFILL) |
| + // to see how often users have to correct autofilled data. |
| + enum UserHappinessMetric { |
| + // Loaded a page containing (potentially autofillable) forms. |
|
dhollowa
2011/08/25 21:48:15
Can lose parenthetical comment.
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + FORMS_LOADED, |
| + // Submitted a form that was never autofilled. |
| + FORM_SUBMITTED_WITHOUT_AUTOFILL, |
| + // Submitted a form for which at least some fields were autofilled. |
| + FORM_SUBMITTED_AFTER_AUTOFILL, |
|
dhollowa
2011/08/25 21:48:15
nix: WITHOUT and AFTER, in favor of ALL, SOME, NON
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + // Submitted a form with at least three field values that match the user's |
| + // client'stored Autofill data. |
|
dhollowa
2011/08/25 21:48:15
s/client'stored/stored/
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + SUBMITTED_FORM_COULD_HAVE_BEEN_AUTOFILLED, |
|
dhollowa
2011/08/25 21:48:15
This is a "total" for three other possible happine
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + |
| + // User manually filled one of the form fields. |
| + USER_DID_TYPE, |
| + // We showed a popup containing Autofill suggestions. |
| + SUGGESTIONS_SHOWN, |
| + // Same as above, but only logged once per page load. |
| + SUGGESTIONS_SHOWN_FIRST_TIME, |
|
dhollowa
2011/08/25 21:48:15
s/FIRST_TIME/ONCE/
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + // User autofilled at least part of the form. |
| + USER_DID_AUTOFILL, |
| + // Same as above, but only logged once per page load. |
| + USER_DID_AUTOFILL_FIRST_TIME, |
|
dhollowa
2011/08/25 21:48:15
s/FIRST_TIME/ONCE/
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + // User edited a previously autofilled field. |
| + USER_DID_EDIT_AUTOFILLED_FIELD, |
|
dhollowa
2011/08/25 21:48:15
It would be interesting to have ONCE and non-ONCE
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + NUM_USER_HAPPINESS_METRICS |
| + }; |
| + |
| + // TODO(isherman): Add histograms to measure time elapsed between form load |
|
dhollowa
2011/08/25 21:48:15
Comparing "fillable filled" and "fillable un-fille
Ilya Sherman
2011/08/26 00:23:32
Done.
|
| + // form submission. |
| + |
| AutofillMetrics(); |
| virtual ~AutofillMetrics(); |
| @@ -101,6 +135,8 @@ class AutofillMetrics { |
| virtual void LogServerQueryMetric(ServerQueryMetric metric) const; |
| + virtual void LogUserHappinessMetric(UserHappinessMetric metric) const; |
| + |
| // This should be called each time a page containing forms is loaded. |
| virtual void LogIsAutofillEnabledAtPageLoad(bool enabled) const; |