| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/autofill/phone_number_i18n.h" | 5 #include "chrome/browser/autofill/phone_number_i18n.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" |
| 9 #include "base/stringprintf.h" |
| 8 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| 9 #include "base/string_util.h" | |
| 10 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 11 #include "third_party/libphonenumber/cpp/src/phonenumberutil.h" | 12 #include "third_party/libphonenumber/cpp/src/phonenumberutil.h" |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 std::string SanitizeLocaleCode(const std::string& locale_code) { | 16 std::string SanitizeLocaleCode(const std::string& locale_code) { |
| 16 if (locale_code.length() == 2) | 17 if (locale_code.length() == 2) |
| 17 return locale_code; | 18 return locale_code; |
| 18 // Use USA for incomplete locales. | 19 // Use USA for incomplete locales. |
| 19 return std::string("US"); | 20 return std::string("US"); |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 233 } |
| 233 | 234 |
| 234 bool PhoneNumbersMatch(const string16& number_a, | 235 bool PhoneNumbersMatch(const string16& number_a, |
| 235 const string16& number_b, | 236 const string16& number_b, |
| 236 const std::string& country_code) { | 237 const std::string& country_code) { |
| 237 return ComparePhones(number_a, number_b, country_code) == PHONES_EQUAL; | 238 return ComparePhones(number_a, number_b, country_code) == PHONES_EQUAL; |
| 238 } | 239 } |
| 239 | 240 |
| 240 } // namespace autofill_i18n | 241 } // namespace autofill_i18n |
| 241 | 242 |
| OLD | NEW |