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

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

Issue 1010263002: [Autofill] Add FormEvent logging for "will submit form". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 bool AutofillManager::OnWillSubmitForm(const FormData& form, 322 bool AutofillManager::OnWillSubmitForm(const FormData& form,
323 const TimeTicks& timestamp) { 323 const TimeTicks& timestamp) {
324 if (!IsValidFormData(form)) 324 if (!IsValidFormData(form))
325 return false; 325 return false;
326 326
327 scoped_ptr<FormStructure> submitted_form = ValidateSubmittedForm(form); 327 scoped_ptr<FormStructure> submitted_form = ValidateSubmittedForm(form);
328 if (!submitted_form) 328 if (!submitted_form)
329 return false; 329 return false;
330 330
331 AutofillMetrics::LogIsFormUserSubmitted(form.user_submitted);
332
331 address_form_event_logger_->OnDidSubmitForm(); 333 address_form_event_logger_->OnDidSubmitForm();
332 credit_card_form_event_logger_->OnDidSubmitForm(); 334 credit_card_form_event_logger_->OnDidSubmitForm();
333 335
334 // Only upload server statistics and UMA metrics if at least some local data 336 // Only upload server statistics and UMA metrics if at least some local data
335 // is available to use as a baseline. 337 // is available to use as a baseline.
336 const std::vector<AutofillProfile*>& profiles = personal_data_->GetProfiles(); 338 const std::vector<AutofillProfile*>& profiles = personal_data_->GetProfiles();
337 if (submitted_form->IsAutofillable()) { 339 if (submitted_form->IsAutofillable()) {
338 AutofillMetrics::LogNumberOfProfilesAtAutofillableFormSubmission( 340 AutofillMetrics::LogNumberOfProfilesAtAutofillableFormSubmission(
339 personal_data_->GetProfiles().size()); 341 personal_data_->GetProfiles().size());
340 } 342 }
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 return false; 1463 return false;
1462 1464
1463 // Disregard forms that we wouldn't ever autofill in the first place. 1465 // Disregard forms that we wouldn't ever autofill in the first place.
1464 if (!form.ShouldBeParsed()) 1466 if (!form.ShouldBeParsed())
1465 return false; 1467 return false;
1466 1468
1467 return true; 1469 return true;
1468 } 1470 }
1469 1471
1470 } // namespace autofill 1472 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_metrics.h » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698