Chromium Code Reviews| Index: components/autofill/core/browser/personal_data_manager.cc |
| diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc |
| index 8039bc4e6013783e6b65278799583dedbcbec2c9..3987ba1ff274f1c690bfd05d57d6828da2cc5566 100644 |
| --- a/components/autofill/core/browser/personal_data_manager.cc |
| +++ b/components/autofill/core/browser/personal_data_manager.cc |
| @@ -1115,8 +1115,7 @@ bool PersonalDataManager::IsCountryOfInterest(const std::string& country_code) |
| AutofillCountry::CountryCodeForLocale(app_locale()))); |
| } |
| - return std::find(country_codes.begin(), country_codes.end(), |
| - base::ToLowerASCII(country_code)) != country_codes.end(); |
| + return base::ContainsValue(country_codes, base::ToLowerASCII(country_code)); |
|
vabr (Chromium)
2017/07/09 18:23:59
Please also #include "base/stl_util.h" in this fil
deejay
2017/07/10 03:47:16
Done.
|
| } |
| const std::string& PersonalDataManager::GetDefaultCountryCodeForNewAddress() |
| @@ -1384,8 +1383,7 @@ std::string PersonalDataManager::MostCommonCountryCodeFromProfiles() const { |
| std::string country_code = base::ToUpperASCII(base::UTF16ToASCII( |
| profiles[i]->GetRawInfo(ADDRESS_HOME_COUNTRY))); |
| - if (std::find(country_codes.begin(), country_codes.end(), country_code) != |
| - country_codes.end()) { |
| + if (base::ContainsValue(country_codes, country_code)) { |
| // Verified profiles count 100x more than unverified ones. |
| votes[country_code] += profiles[i]->IsVerified() ? 100 : 1; |
| } |