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 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // with it, falls back to the country code corresponding to the |app_locale|. | 80 // with it, falls back to the country code corresponding to the |app_locale|. |
81 std::string GetRegion(const std::string& app_locale) const; | 81 std::string GetRegion(const std::string& app_locale) const; |
82 | 82 |
83 // Updates the cached parsed number if the profile's region has changed | 83 // Updates the cached parsed number if the profile's region has changed |
84 // since the last time the cache was updated. | 84 // since the last time the cache was updated. |
85 void UpdateCacheIfNeeded(const std::string& app_locale) const; | 85 void UpdateCacheIfNeeded(const std::string& app_locale) const; |
86 | 86 |
87 // The phone number. | 87 // The phone number. |
88 string16 number_; | 88 string16 number_; |
89 // Profile which stores the region used as hint when normalizing the number. | 89 // Profile which stores the region used as hint when normalizing the number. |
90 AutofillProfile* profile_; // WEAK | 90 const AutofillProfile* profile_; // WEAK |
91 | 91 |
92 // Cached number. | 92 // Cached number. |
93 mutable autofill_i18n::PhoneObject cached_parsed_phone_; | 93 mutable autofill_i18n::PhoneObject cached_parsed_phone_; |
94 }; | 94 }; |
95 | 95 |
96 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 96 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
OLD | NEW |