| 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 // If there is no CC number, return name to show something. | 665 // If there is no CC number, return name to show something. |
| 666 label = | 666 label = |
| 667 credit_card->GetInfo(AutofillType(CREDIT_CARD_NAME), app_locale_); | 667 credit_card->GetInfo(AutofillType(CREDIT_CARD_NAME), app_locale_); |
| 668 } else { | 668 } else { |
| 669 label = kCreditCardPrefix; | 669 label = kCreditCardPrefix; |
| 670 label.append(credit_card->LastFourDigits()); | 670 label.append(credit_card->LastFourDigits()); |
| 671 } | 671 } |
| 672 | 672 |
| 673 values->push_back(creditcard_field_value); | 673 values->push_back(creditcard_field_value); |
| 674 labels->push_back(label); | 674 labels->push_back(label); |
| 675 icons->push_back(UTF8ToUTF16(credit_card->type())); | 675 icons->push_back(base::UTF8ToUTF16(credit_card->type())); |
| 676 guid_pairs->push_back(GUIDPair(credit_card->guid(), 0)); | 676 guid_pairs->push_back(GUIDPair(credit_card->guid(), 0)); |
| 677 } | 677 } |
| 678 } | 678 } |
| 679 } | 679 } |
| 680 | 680 |
| 681 bool PersonalDataManager::IsAutofillEnabled() const { | 681 bool PersonalDataManager::IsAutofillEnabled() const { |
| 682 return pref_service_->GetBoolean(prefs::kAutofillEnabled); | 682 return pref_service_->GetBoolean(prefs::kAutofillEnabled); |
| 683 } | 683 } |
| 684 | 684 |
| 685 // static | 685 // static |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 if (!votes.empty()) { | 1017 if (!votes.empty()) { |
| 1018 std::map<std::string, int>::iterator iter = | 1018 std::map<std::string, int>::iterator iter = |
| 1019 std::max_element(votes.begin(), votes.end(), CompareVotes); | 1019 std::max_element(votes.begin(), votes.end(), CompareVotes); |
| 1020 return iter->first; | 1020 return iter->first; |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 return std::string(); | 1023 return std::string(); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 } // namespace autofill | 1026 } // namespace autofill |
| OLD | NEW |