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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // abandon the import. | 384 // abandon the import. |
385 if (!IsValidFieldTypeAndValue(types_seen, server_field_type, value)) { | 385 if (!IsValidFieldTypeAndValue(types_seen, server_field_type, value)) { |
386 imported_profile.reset(); | 386 imported_profile.reset(); |
387 local_imported_credit_card.reset(); | 387 local_imported_credit_card.reset(); |
388 break; | 388 break; |
389 } | 389 } |
390 | 390 |
391 types_seen.insert(server_field_type); | 391 types_seen.insert(server_field_type); |
392 | 392 |
393 if (group == CREDIT_CARD) { | 393 if (group == CREDIT_CARD) { |
394 if (LowerCaseEqualsASCII(field->form_control_type, "month")) { | 394 if (base::LowerCaseEqualsASCII(field->form_control_type, "month")) { |
395 DCHECK_EQ(CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR, server_field_type); | 395 DCHECK_EQ(CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR, server_field_type); |
396 local_imported_credit_card->SetInfoForMonthInputType(value); | 396 local_imported_credit_card->SetInfoForMonthInputType(value); |
397 } else { | 397 } else { |
398 local_imported_credit_card->SetInfo(field_type, value, app_locale_); | 398 local_imported_credit_card->SetInfo(field_type, value, app_locale_); |
399 } | 399 } |
400 ++importable_credit_card_fields; | 400 ++importable_credit_card_fields; |
401 } else { | 401 } else { |
402 // We need to store phone data in the variables, before building the whole | 402 // We need to store phone data in the variables, before building the whole |
403 // number at the end. The rest of the fields are set "as is". | 403 // number at the end. The rest of the fields are set "as is". |
404 // If the fields are not the phone fields in question home.SetInfo() is | 404 // If the fields are not the phone fields in question home.SetInfo() is |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 } | 1326 } |
1327 if (IsExperimentalWalletIntegrationEnabled() && | 1327 if (IsExperimentalWalletIntegrationEnabled() && |
1328 pref_service_->GetBoolean(prefs::kAutofillWalletImportEnabled)) { | 1328 pref_service_->GetBoolean(prefs::kAutofillWalletImportEnabled)) { |
1329 profiles_.insert( | 1329 profiles_.insert( |
1330 profiles_.end(), server_profiles_.begin(), server_profiles_.end()); | 1330 profiles_.end(), server_profiles_.begin(), server_profiles_.end()); |
1331 } | 1331 } |
1332 return profiles_; | 1332 return profiles_; |
1333 } | 1333 } |
1334 | 1334 |
1335 } // namespace autofill | 1335 } // namespace autofill |
OLD | NEW |