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

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

Issue 23432002: Generate passwords only for forms that autofill server marks as account creation forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix password generation manager browser test. Created 7 years, 3 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 } 700 }
701 } 701 }
702 702
703 void AutofillManager::OnLoadedServerPredictions( 703 void AutofillManager::OnLoadedServerPredictions(
704 const std::string& response_xml) { 704 const std::string& response_xml) {
705 // Parse and store the server predictions. 705 // Parse and store the server predictions.
706 FormStructure::ParseQueryResponse(response_xml, 706 FormStructure::ParseQueryResponse(response_xml,
707 form_structures_.get(), 707 form_structures_.get(),
708 *metric_logger_); 708 *metric_logger_);
709 709
710 // Forward form structures to the password generation manager to detect
711 // account creation forms.
712 manager_delegate_->DetectAccountCreationForms(form_structures_.get());
713
710 // If the corresponding flag is set, annotate forms with the predicted types. 714 // If the corresponding flag is set, annotate forms with the predicted types.
711 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get()); 715 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get());
712 } 716 }
713 717
714 void AutofillManager::OnDidEndTextFieldEditing() { 718 void AutofillManager::OnDidEndTextFieldEditing() {
715 external_delegate_->DidEndTextFieldEditing(); 719 external_delegate_->DidEndTextFieldEditing();
716 } 720 }
717 721
718 bool AutofillManager::IsAutofillEnabled() const { 722 bool AutofillManager::IsAutofillEnabled() const {
719 return manager_delegate_->GetPrefs()->GetBoolean(prefs::kAutofillEnabled); 723 return manager_delegate_->GetPrefs()->GetBoolean(prefs::kAutofillEnabled);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 1118
1115 void AutofillManager::UpdateInitialInteractionTimestamp( 1119 void AutofillManager::UpdateInitialInteractionTimestamp(
1116 const TimeTicks& interaction_timestamp) { 1120 const TimeTicks& interaction_timestamp) {
1117 if (initial_interaction_timestamp_.is_null() || 1121 if (initial_interaction_timestamp_.is_null() ||
1118 interaction_timestamp < initial_interaction_timestamp_) { 1122 interaction_timestamp < initial_interaction_timestamp_) {
1119 initial_interaction_timestamp_ = interaction_timestamp; 1123 initial_interaction_timestamp_ = interaction_timestamp;
1120 } 1124 }
1121 } 1125 }
1122 1126
1123 } // namespace autofill 1127 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698