OLD | NEW |
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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 | 766 |
767 void AutofillManager::OnLoadedServerPredictions( | 767 void AutofillManager::OnLoadedServerPredictions( |
768 const std::string& response_xml) { | 768 const std::string& response_xml) { |
769 // Parse and store the server predictions. | 769 // Parse and store the server predictions. |
770 FormStructure::ParseQueryResponse(response_xml, | 770 FormStructure::ParseQueryResponse(response_xml, |
771 form_structures_.get(), | 771 form_structures_.get(), |
772 *metric_logger_); | 772 *metric_logger_); |
773 | 773 |
774 // Forward form structures to the password generation manager to detect | 774 // Forward form structures to the password generation manager to detect |
775 // account creation forms. | 775 // account creation forms. |
776 client_->DetectAccountCreationForms(form_structures_.get()); | 776 driver_->DetectAccountCreationForms(form_structures_.get()); |
777 | 777 |
778 // If the corresponding flag is set, annotate forms with the predicted types. | 778 // If the corresponding flag is set, annotate forms with the predicted types. |
779 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get()); | 779 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get()); |
780 } | 780 } |
781 | 781 |
782 void AutofillManager::OnDidEndTextFieldEditing() { | 782 void AutofillManager::OnDidEndTextFieldEditing() { |
783 external_delegate_->DidEndTextFieldEditing(); | 783 external_delegate_->DidEndTextFieldEditing(); |
784 } | 784 } |
785 | 785 |
786 bool AutofillManager::IsAutofillEnabled() const { | 786 bool AutofillManager::IsAutofillEnabled() const { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 return false; | 1244 return false; |
1245 | 1245 |
1246 // Disregard forms that we wouldn't ever autofill in the first place. | 1246 // Disregard forms that we wouldn't ever autofill in the first place. |
1247 if (!form.ShouldBeParsed()) | 1247 if (!form.ShouldBeParsed()) |
1248 return false; | 1248 return false; |
1249 | 1249 |
1250 return true; | 1250 return true; |
1251 } | 1251 } |
1252 | 1252 |
1253 } // namespace autofill | 1253 } // namespace autofill |
OLD | NEW |