| 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 void AutofillManager::GetProfileSuggestions( | 1068 void AutofillManager::GetProfileSuggestions( |
| 1069 FormStructure* form, | 1069 FormStructure* form, |
| 1070 const FormFieldData& field, | 1070 const FormFieldData& field, |
| 1071 const AutofillType& type, | 1071 const AutofillType& type, |
| 1072 std::vector<base::string16>* values, | 1072 std::vector<base::string16>* values, |
| 1073 std::vector<base::string16>* labels, | 1073 std::vector<base::string16>* labels, |
| 1074 std::vector<base::string16>* icons, | 1074 std::vector<base::string16>* icons, |
| 1075 std::vector<int>* unique_ids) const { | 1075 std::vector<int>* unique_ids) const { |
| 1076 std::vector<ServerFieldType> field_types(form->field_count()); | 1076 std::vector<ServerFieldType> field_types(form->field_count()); |
| 1077 for (size_t i = 0; i < form->field_count(); ++i) { | 1077 for (size_t i = 0; i < form->field_count(); ++i) { |
| 1078 field_types.push_back(form->field(i)->Type().server_type()); | 1078 field_types.push_back(form->field(i)->Type().GetStorableType()); |
| 1079 } | 1079 } |
| 1080 std::vector<GUIDPair> guid_pairs; | 1080 std::vector<GUIDPair> guid_pairs; |
| 1081 | 1081 |
| 1082 personal_data_->GetProfileSuggestions( | 1082 personal_data_->GetProfileSuggestions( |
| 1083 type, field.value, field.is_autofilled, field_types, | 1083 type, field.value, field.is_autofilled, field_types, |
| 1084 values, labels, icons, &guid_pairs); | 1084 values, labels, icons, &guid_pairs); |
| 1085 | 1085 |
| 1086 for (size_t i = 0; i < guid_pairs.size(); ++i) { | 1086 for (size_t i = 0; i < guid_pairs.size(); ++i) { |
| 1087 unique_ids->push_back(PackGUIDs(GUIDPair(std::string(), 0), | 1087 unique_ids->push_back(PackGUIDs(GUIDPair(std::string(), 0), |
| 1088 guid_pairs[i])); | 1088 guid_pairs[i])); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 | 1210 |
| 1211 void AutofillManager::UpdateInitialInteractionTimestamp( | 1211 void AutofillManager::UpdateInitialInteractionTimestamp( |
| 1212 const TimeTicks& interaction_timestamp) { | 1212 const TimeTicks& interaction_timestamp) { |
| 1213 if (initial_interaction_timestamp_.is_null() || | 1213 if (initial_interaction_timestamp_.is_null() || |
| 1214 interaction_timestamp < initial_interaction_timestamp_) { | 1214 interaction_timestamp < initial_interaction_timestamp_) { |
| 1215 initial_interaction_timestamp_ = interaction_timestamp; | 1215 initial_interaction_timestamp_ = interaction_timestamp; |
| 1216 } | 1216 } |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 } // namespace autofill | 1219 } // namespace autofill |
| OLD | NEW |