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

Side by Side Diff: components/autofill/core/browser/form_structure.cc

Issue 2793533003: Add UKM logging of UPI-VPA autocomplete hints. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « components/autofill/core/browser/autofill_metrics_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/autofill/core/browser/form_structure.h" 5 #include "components/autofill/core/browser/form_structure.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 ? AutofillMetrics::FILLABLE_FORM_PARSED_WITH_TYPE_HINTS 368 ? AutofillMetrics::FILLABLE_FORM_PARSED_WITH_TYPE_HINTS
369 : AutofillMetrics::FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS; 369 : AutofillMetrics::FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS;
370 AutofillMetrics::LogDeveloperEngagementMetric(metric); 370 AutofillMetrics::LogDeveloperEngagementMetric(metric);
371 AutofillMetrics::LogDeveloperEngagementUkm(ukm_service, source_url(), 371 AutofillMetrics::LogDeveloperEngagementUkm(ukm_service, source_url(),
372 metric); 372 metric);
373 } 373 }
374 374
375 if (has_author_specified_upi_vpa_hint_) { 375 if (has_author_specified_upi_vpa_hint_) {
376 AutofillMetrics::LogDeveloperEngagementMetric( 376 AutofillMetrics::LogDeveloperEngagementMetric(
377 AutofillMetrics::FORM_CONTAINS_UPI_VPA_HINT); 377 AutofillMetrics::FORM_CONTAINS_UPI_VPA_HINT);
378 AutofillMetrics::LogDeveloperEngagementUkm(
379 ukm_service, source_url(), AutofillMetrics::FORM_CONTAINS_UPI_VPA_HINT);
378 } 380 }
379 381
380 AutofillMetrics::LogDetermineHeuristicTypesTiming( 382 AutofillMetrics::LogDetermineHeuristicTypesTiming(
381 base::TimeTicks::Now() - determine_heuristic_types_start_time); 383 base::TimeTicks::Now() - determine_heuristic_types_start_time);
382 } 384 }
383 385
384 bool FormStructure::EncodeUploadRequest( 386 bool FormStructure::EncodeUploadRequest(
385 const ServerFieldTypeSet& available_field_types, 387 const ServerFieldTypeSet& available_field_types,
386 bool form_was_autofilled, 388 bool form_was_autofilled,
387 const std::string& login_form_signature, 389 const std::string& login_form_signature,
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 filtered_strings[0].at(prefix_len)) { 1338 filtered_strings[0].at(prefix_len)) {
1337 // Mismatch found. 1339 // Mismatch found.
1338 return filtered_strings[i].substr(0, prefix_len); 1340 return filtered_strings[i].substr(0, prefix_len);
1339 } 1341 }
1340 } 1342 }
1341 } 1343 }
1342 return filtered_strings[0]; 1344 return filtered_strings[0];
1343 } 1345 }
1344 1346
1345 } // namespace autofill 1347 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_metrics_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698