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.h" | 5 #include "components/autofill/browser/phone_number.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/autofill/autofill_country.h" | 11 #include "components/autofill/browser/autofill_country.h" |
12 #include "chrome/browser/autofill/autofill_profile.h" | 12 #include "components/autofill/browser/autofill_profile.h" |
13 #include "chrome/browser/autofill/autofill_type.h" | 13 #include "components/autofill/browser/autofill_type.h" |
14 #include "chrome/browser/autofill/field_types.h" | 14 #include "components/autofill/browser/field_types.h" |
15 #include "chrome/browser/autofill/phone_number_i18n.h" | 15 #include "components/autofill/browser/phone_number_i18n.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 const char16 kPhoneNumberSeparators[] = { ' ', '.', '(', ')', '-', 0 }; | 19 const char16 kPhoneNumberSeparators[] = { ' ', '.', '(', ')', '-', 0 }; |
20 | 20 |
21 // The number of digits in a phone number. | 21 // The number of digits in a phone number. |
22 const size_t kPhoneNumberLength = 7; | 22 const size_t kPhoneNumberLength = 7; |
23 | 23 |
24 // The number of digits in an area code. | 24 // The number of digits in an area code. |
25 const size_t kPhoneCityCodeLength = 3; | 25 const size_t kPhoneCityCodeLength = 3; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 return true; | 229 return true; |
230 } | 230 } |
231 | 231 |
232 return autofill_i18n::ConstructPhoneNumber( | 232 return autofill_i18n::ConstructPhoneNumber( |
233 country_, city_, phone_, GetRegion(profile, app_locale), value); | 233 country_, city_, phone_, GetRegion(profile, app_locale), value); |
234 } | 234 } |
235 | 235 |
236 bool PhoneNumber::PhoneCombineHelper::IsEmpty() const { | 236 bool PhoneNumber::PhoneCombineHelper::IsEmpty() const { |
237 return phone_.empty() && whole_number_.empty(); | 237 return phone_.empty() && whole_number_.empty(); |
238 } | 238 } |
OLD | NEW |