| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 const std::vector<CreditCard*>& PersonalDataManager::GetLocalCreditCards() | 669 const std::vector<CreditCard*>& PersonalDataManager::GetLocalCreditCards() |
| 670 const { | 670 const { |
| 671 return local_credit_cards_.get(); | 671 return local_credit_cards_.get(); |
| 672 } | 672 } |
| 673 | 673 |
| 674 const std::vector<CreditCard*>& PersonalDataManager::GetCreditCards() const { | 674 const std::vector<CreditCard*>& PersonalDataManager::GetCreditCards() const { |
| 675 credit_cards_.clear(); | 675 credit_cards_.clear(); |
| 676 credit_cards_.insert(credit_cards_.end(), local_credit_cards_.begin(), | 676 credit_cards_.insert(credit_cards_.end(), local_credit_cards_.begin(), |
| 677 local_credit_cards_.end()); | 677 local_credit_cards_.end()); |
| 678 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 678 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 679 switches::kEnableWalletCardImport)) { | 679 switches::kEnableWalletCardImport) && |
| 680 pref_service_->GetBoolean(prefs::kAutofillWalletImportEnabled)) { |
| 680 credit_cards_.insert(credit_cards_.end(), server_credit_cards_.begin(), | 681 credit_cards_.insert(credit_cards_.end(), server_credit_cards_.begin(), |
| 681 server_credit_cards_.end()); | 682 server_credit_cards_.end()); |
| 682 } | 683 } |
| 683 return credit_cards_; | 684 return credit_cards_; |
| 684 } | 685 } |
| 685 | 686 |
| 686 void PersonalDataManager::Refresh() { | 687 void PersonalDataManager::Refresh() { |
| 687 LoadProfiles(); | 688 LoadProfiles(); |
| 688 LoadCreditCards(); | 689 LoadCreditCards(); |
| 689 } | 690 } |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 | 1211 |
| 1211 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end()); | 1212 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end()); |
| 1212 profiles_.insert( | 1213 profiles_.insert( |
| 1213 profiles_.end(), auxiliary_profiles_.begin(), auxiliary_profiles_.end()); | 1214 profiles_.end(), auxiliary_profiles_.begin(), auxiliary_profiles_.end()); |
| 1214 profiles_.insert( | 1215 profiles_.insert( |
| 1215 profiles_.end(), server_profiles_.begin(), server_profiles_.end()); | 1216 profiles_.end(), server_profiles_.begin(), server_profiles_.end()); |
| 1216 return profiles_; | 1217 return profiles_; |
| 1217 } | 1218 } |
| 1218 | 1219 |
| 1219 } // namespace autofill | 1220 } // namespace autofill |
| OLD | NEW |