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/personal_data_manager.h" | 5 #include "components/autofill/core/browser/personal_data_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <iterator> | 9 #include <iterator> |
10 | 10 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // parts, address parts. | 242 // parts, address parts. |
243 std::set<ServerFieldType> types_seen; | 243 std::set<ServerFieldType> types_seen; |
244 | 244 |
245 // We only set complete phone, so aggregate phone parts in these vars and set | 245 // We only set complete phone, so aggregate phone parts in these vars and set |
246 // complete at the end. | 246 // complete at the end. |
247 PhoneNumber::PhoneCombineHelper home; | 247 PhoneNumber::PhoneCombineHelper home; |
248 | 248 |
249 for (size_t i = 0; i < form.field_count(); ++i) { | 249 for (size_t i = 0; i < form.field_count(); ++i) { |
250 const AutofillField* field = form.field(i); | 250 const AutofillField* field = form.field(i); |
251 base::string16 value; | 251 base::string16 value; |
252 TrimWhitespace(field->value, TRIM_ALL, &value); | 252 base::TrimWhitespace(field->value, base::TRIM_ALL, &value); |
253 | 253 |
254 // If we don't know the type of the field, or the user hasn't entered any | 254 // If we don't know the type of the field, or the user hasn't entered any |
255 // information into the field, then skip it. | 255 // information into the field, then skip it. |
256 if (!field->IsFieldFillable() || value.empty()) | 256 if (!field->IsFieldFillable() || value.empty()) |
257 continue; | 257 continue; |
258 | 258 |
259 AutofillType field_type = field->Type(); | 259 AutofillType field_type = field->Type(); |
260 ServerFieldType server_field_type = field_type.GetStorableType(); | 260 ServerFieldType server_field_type = field_type.GetStorableType(); |
261 FieldTypeGroup group(field_type.group()); | 261 FieldTypeGroup group(field_type.group()); |
262 | 262 |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 | 1070 |
1071 return std::string(); | 1071 return std::string(); |
1072 } | 1072 } |
1073 | 1073 |
1074 void PersonalDataManager::EnabledPrefChanged() { | 1074 void PersonalDataManager::EnabledPrefChanged() { |
1075 default_country_code_.clear(); | 1075 default_country_code_.clear(); |
1076 NotifyPersonalDataChanged(); | 1076 NotifyPersonalDataChanged(); |
1077 } | 1077 } |
1078 | 1078 |
1079 } // namespace autofill | 1079 } // namespace autofill |
OLD | NEW |