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

Unified Diff: chrome/browser/autofill/autofill_metrics.h

Issue 5703002: Add some basic success/failure UMA logging for autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_metrics.h
diff --git a/chrome/browser/autofill/autofill_metrics.h b/chrome/browser/autofill/autofill_metrics.h
index d461668880b9be136c9804799b85e5200d15522b..e7bdce419c48621cb57e93449444446f187a0b5e 100644
--- a/chrome/browser/autofill/autofill_metrics.h
+++ b/chrome/browser/autofill/autofill_metrics.h
@@ -8,29 +8,48 @@
namespace autofill_metrics {
-// Each of these should be logged at most once per query to the server, which in
-// turn should occur at most once per page load.
+// Each of these is logged at most once per query to the server, which in turn
+// occurs at most once per page load.
enum ServerQueryMetricType {
- // Logged for each query sent to the server
+ // Logged for each query sent to the server.
QUERY_SENT = 0,
- // Logged for each query response received from the server
+ // Logged for each query response received from the server.
QUERY_RESPONSE_RECEIVED,
- // Logged for each parsable response received from the server
+ // Logged for each parsable response received from the server.
QUERY_RESPONSE_PARSED,
// Logged for each parsable response that provided no improvements relative to
// our heuristics.
QUERY_RESPONSE_MATCHED_LOCAL_HEURISTICS,
// Logged for each page for which our heuristics detected at least one
// auto-fillable field, but the server response overrode the type of at least
- // one field
+ // one field.
QUERY_RESPONSE_OVERRODE_LOCAL_HEURISTICS,
// Logged for each page for which our heuristics did not detect any
// auto-fillable fields, but the server response did detect some.
QUERY_RESPONSE_WITH_NO_LOCAL_HEURISTICS,
NUM_SERVER_QUERY_METRICS
};
+typedef void (*LogServerQueryMetricFn)(ServerQueryMetricType);
+
+// Each of these is logged at most once per form submission.
+enum QualityMetricType {
+ // Logged for each field in a submitted form.
+ FIELD_SUBMITTED = 0,
+ // A simple successs metric, logged for each field that returns true for
+ // |is_autofilled()| and has a value that is present in the personal data
+ // manager. There is a small chance of false positives from filling via
+ // autocomplete rather than autofill.
+ FIELD_AUTOFILLED,
+ // A simple failure metric, logged for each field that returns false for
+ // |is_autofilled()| but as a value that is present in the personal data
+ // manager.
+ FIELD_AUTOFILL_FAILED,
+ NUM_QUALITY_METRICS
+};
+typedef void (*LogQualityMetricFn)(QualityMetricType);
dhollowa 2010/12/10 21:37:38 I think this all might be cleaner if we just chang
Ilya Sherman 2010/12/11 03:35:03 I changed this around to use two classes, one for
void LogServerQueryMetric(ServerQueryMetricType type);
+void LogQualityMetric(QualityMetricType type);
} // namespace autofill_metrics

Powered by Google App Engine
This is Rietveld 408576698