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

Unified Diff: chrome/browser/autofill/form_structure.cc

Issue 5703002: Add some basic success/failure UMA logging for autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forbid copying, assignments (just like in, school) 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
« no previous file with comments | « chrome/browser/autofill/form_structure.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_structure.cc
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 2958df6728282b46ecbdf4755861b7569ce68504..8ae8eb236d6abb959dde2a11028d0383c64a8270 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -194,9 +194,9 @@ bool FormStructure::EncodeQueryRequest(const ScopedVector<FormStructure>& forms,
// static
void FormStructure::ParseQueryResponse(const std::string& response_xml,
const std::vector<FormStructure*>& forms,
- UploadRequired* upload_required) {
- autofill_metrics::LogServerQueryMetric(
- autofill_metrics::QUERY_RESPONSE_RECEIVED);
+ UploadRequired* upload_required,
+ const AutoFillMetrics& metric_logger) {
+ metric_logger.Log(AutoFillMetrics::QUERY_RESPONSE_RECEIVED);
// Parse the field types from the server response to the query.
std::vector<AutoFillFieldType> field_types;
@@ -206,8 +206,7 @@ void FormStructure::ParseQueryResponse(const std::string& response_xml,
if (!parse_handler.succeeded())
return;
- autofill_metrics::LogServerQueryMetric(
- autofill_metrics::QUERY_RESPONSE_PARSED);
+ metric_logger.Log(AutoFillMetrics::QUERY_RESPONSE_PARSED);
bool heuristics_detected_fillable_field = false;
bool query_response_overrode_heuristics = false;
@@ -250,17 +249,17 @@ void FormStructure::ParseQueryResponse(const std::string& response_xml,
form->UpdateAutoFillCount();
}
- autofill_metrics::ServerQueryMetricType metric_type;
+ AutoFillMetrics::ServerQueryMetric metric;
if (query_response_overrode_heuristics) {
if (heuristics_detected_fillable_field) {
- metric_type = autofill_metrics::QUERY_RESPONSE_OVERRODE_LOCAL_HEURISTICS;
+ metric = AutoFillMetrics::QUERY_RESPONSE_OVERRODE_LOCAL_HEURISTICS;
} else {
- metric_type = autofill_metrics::QUERY_RESPONSE_WITH_NO_LOCAL_HEURISTICS;
+ metric = AutoFillMetrics::QUERY_RESPONSE_WITH_NO_LOCAL_HEURISTICS;
}
} else {
- metric_type = autofill_metrics::QUERY_RESPONSE_MATCHED_LOCAL_HEURISTICS;
+ metric = AutoFillMetrics::QUERY_RESPONSE_MATCHED_LOCAL_HEURISTICS;
}
- autofill_metrics::LogServerQueryMetric(metric_type);
+ metric_logger.Log(metric);
}
std::string FormStructure::FormSignature() const {
« no previous file with comments | « chrome/browser/autofill/form_structure.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698