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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_NUMBER_I18N_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_NUMBER_I18N_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_NUMBER_I18N_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_NUMBER_I18N_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 PhoneObject(); | 73 PhoneObject(); |
74 ~PhoneObject(); | 74 ~PhoneObject(); |
75 | 75 |
76 std::string region() const { return region_; } | 76 std::string region() const { return region_; } |
77 | 77 |
78 base::string16 country_code() const { return country_code_; } | 78 base::string16 country_code() const { return country_code_; } |
79 base::string16 city_code() const { return city_code_; } | 79 base::string16 city_code() const { return city_code_; } |
80 base::string16 number() const { return number_; } | 80 base::string16 number() const { return number_; } |
81 | 81 |
82 base::string16 GetFormattedNumber() const; | 82 base::string16 GetFormattedNumber() const; |
| 83 base::string16 GetNationallyFormattedNumber() const; |
83 base::string16 GetWholeNumber() const; | 84 base::string16 GetWholeNumber() const; |
84 | 85 |
85 PhoneObject& operator=(const PhoneObject& other); | 86 PhoneObject& operator=(const PhoneObject& other); |
86 | 87 |
87 bool IsValidNumber() const { return i18n_number_ != NULL; } | 88 bool IsValidNumber() const { return i18n_number_ != NULL; } |
88 | 89 |
89 private: | 90 private: |
90 // The region code used to parse this number. | 91 // The region code used to parse this number. |
91 std::string region_; | 92 std::string region_; |
92 | 93 |
(...skipping 10 matching lines...) Expand all Loading... |
103 | 104 |
104 // The whole number, normalized to contain only digits if possible. | 105 // The whole number, normalized to contain only digits if possible. |
105 // Set on first request. | 106 // Set on first request. |
106 mutable base::string16 whole_number_; | 107 mutable base::string16 whole_number_; |
107 }; | 108 }; |
108 | 109 |
109 } // namespace i18n | 110 } // namespace i18n |
110 } // namespace autofill | 111 } // namespace autofill |
111 | 112 |
112 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_NUMBER_I18N_H_ | 113 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_NUMBER_I18N_H_ |
OLD | NEW |