| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/autofill_manager.h" | 5 #include "components/autofill/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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 const std::string& response_xml) { | 870 const std::string& response_xml) { |
| 871 scoped_ptr<autofill::AutocheckoutPageMetaData> page_meta_data( | 871 scoped_ptr<autofill::AutocheckoutPageMetaData> page_meta_data( |
| 872 new autofill::AutocheckoutPageMetaData()); | 872 new autofill::AutocheckoutPageMetaData()); |
| 873 | 873 |
| 874 // Parse and store the server predictions. | 874 // Parse and store the server predictions. |
| 875 FormStructure::ParseQueryResponse(response_xml, | 875 FormStructure::ParseQueryResponse(response_xml, |
| 876 form_structures_.get(), | 876 form_structures_.get(), |
| 877 page_meta_data.get(), | 877 page_meta_data.get(), |
| 878 *metric_logger_); | 878 *metric_logger_); |
| 879 | 879 |
| 880 autocheckout_manager_.OnLoadedPageMetaData(page_meta_data.Pass()); | 880 if (!GetAutocheckoutURLPrefix().empty()) |
| 881 autocheckout_manager_.OnLoadedPageMetaData(page_meta_data.Pass()); |
| 881 | 882 |
| 882 // If the corresponding flag is set, annotate forms with the predicted types. | 883 // If the corresponding flag is set, annotate forms with the predicted types. |
| 883 SendAutofillTypePredictions(form_structures_.get()); | 884 SendAutofillTypePredictions(form_structures_.get()); |
| 884 } | 885 } |
| 885 | 886 |
| 886 void AutofillManager::OnDidEndTextFieldEditing() { | 887 void AutofillManager::OnDidEndTextFieldEditing() { |
| 887 if (external_delegate_) | 888 if (external_delegate_) |
| 888 external_delegate_->DidEndTextFieldEditing(); | 889 external_delegate_->DidEndTextFieldEditing(); |
| 889 } | 890 } |
| 890 | 891 |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 *profile_guid = IDToGUID(profile_id); | 1346 *profile_guid = IDToGUID(profile_id); |
| 1346 } | 1347 } |
| 1347 | 1348 |
| 1348 void AutofillManager::UpdateInitialInteractionTimestamp( | 1349 void AutofillManager::UpdateInitialInteractionTimestamp( |
| 1349 const TimeTicks& interaction_timestamp) { | 1350 const TimeTicks& interaction_timestamp) { |
| 1350 if (initial_interaction_timestamp_.is_null() || | 1351 if (initial_interaction_timestamp_.is_null() || |
| 1351 interaction_timestamp < initial_interaction_timestamp_) { | 1352 interaction_timestamp < initial_interaction_timestamp_) { |
| 1352 initial_interaction_timestamp_ = interaction_timestamp; | 1353 initial_interaction_timestamp_ = interaction_timestamp; |
| 1353 } | 1354 } |
| 1354 } | 1355 } |
| OLD | NEW |