Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: components/autofill/browser/phone_number_i18n.h

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/phone_number_i18n.h
===================================================================
--- components/autofill/browser/phone_number_i18n.h (revision 192175)
+++ components/autofill/browser/phone_number_i18n.h (working copy)
@@ -39,13 +39,15 @@
// Normalizes phone number, by changing digits in the extended fonts
// (such as \xFF1x) into '0'-'9'. Also strips out non-digit characters.
string16 NormalizePhoneNumber(const string16& value,
- const std::string& region);
+ const std::string& region,
+ const std::string& app_locale);
// Constructs whole phone number from parts.
// |city_code| - area code, could be empty.
// |country_code| - country code, could be empty.
// |number| - local number, should not be empty.
// |region| - current region, the parsing is based on.
+// |app_locale| - current app locale.
// |whole_number| - constructed whole number.
// Separator characters are stripped before parsing the digits.
// Returns true if parsing was successful, false otherwise.
@@ -53,18 +55,22 @@
const string16& city_code,
const string16& number,
const std::string& region,
+ const std::string& app_locale,
string16* whole_number) WARN_UNUSED_RESULT;
// Returns true if |number_a| and |number_b| parse to the same phone number in
// the given |region|.
bool PhoneNumbersMatch(const string16& number_a,
const string16& number_b,
- const std::string& region);
+ const std::string& region,
+ const std::string& app_locale);
// The cached phone number, does parsing only once, improves performance.
class PhoneObject {
public:
- PhoneObject(const string16& number, const std::string& region);
+ PhoneObject(const string16& number,
+ const std::string& region,
+ const std::string& app_locale);
PhoneObject(const PhoneObject&);
PhoneObject();
~PhoneObject();

Powered by Google App Engine
This is Rietveld 408576698