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

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: Address llya's nits and fix a bug in form structure unit 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 const std::string& response_xml) { 737 const std::string& response_xml) {
738 scoped_ptr<autofill::AutocheckoutPageMetaData> page_meta_data( 738 scoped_ptr<autofill::AutocheckoutPageMetaData> page_meta_data(
739 new autofill::AutocheckoutPageMetaData()); 739 new autofill::AutocheckoutPageMetaData());
740 740
741 // Parse and store the server predictions. 741 // Parse and store the server predictions.
742 FormStructure::ParseQueryResponse(response_xml, 742 FormStructure::ParseQueryResponse(response_xml,
743 form_structures_.get(), 743 form_structures_.get(),
744 page_meta_data.get(), 744 page_meta_data.get(),
745 *metric_logger_); 745 *metric_logger_);
746 746
747 // Forward form structures to the password generation manager to detect
748 // account creation forms.
749 manager_delegate_->DetectAccountCreationForms(form_structures_.get());
750
747 if (page_meta_data->IsInAutofillableFlow()) { 751 if (page_meta_data->IsInAutofillableFlow()) {
748 RenderViewHost* host = driver_->GetWebContents()->GetRenderViewHost(); 752 RenderViewHost* host = driver_->GetWebContents()->GetRenderViewHost();
749 if (host) 753 if (host)
750 host->Send(new AutofillMsg_AutocheckoutSupported(host->GetRoutingID())); 754 host->Send(new AutofillMsg_AutocheckoutSupported(host->GetRoutingID()));
751 } 755 }
752 756
753 // TODO(ahutter): Remove this once Autocheckout is implemented on other 757 // TODO(ahutter): Remove this once Autocheckout is implemented on other
754 // platforms. See http://crbug.com/173416. 758 // platforms. See http://crbug.com/173416.
755 #if defined(TOOLKIT_VIEWS) 759 #if defined(TOOLKIT_VIEWS)
756 if (!GetAutocheckoutURLPrefix().empty()) 760 if (!GetAutocheckoutURLPrefix().empty())
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 1214
1211 void AutofillManager::UpdateInitialInteractionTimestamp( 1215 void AutofillManager::UpdateInitialInteractionTimestamp(
1212 const TimeTicks& interaction_timestamp) { 1216 const TimeTicks& interaction_timestamp) {
1213 if (initial_interaction_timestamp_.is_null() || 1217 if (initial_interaction_timestamp_.is_null() ||
1214 interaction_timestamp < initial_interaction_timestamp_) { 1218 interaction_timestamp < initial_interaction_timestamp_) {
1215 initial_interaction_timestamp_ = interaction_timestamp; 1219 initial_interaction_timestamp_ = interaction_timestamp;
1216 } 1220 }
1217 } 1221 }
1218 1222
1219 } // namespace autofill 1223 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698