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

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

Issue 13973004: Convert string16 -> base::string16 in components/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
diff --git a/components/autofill/browser/phone_number_i18n.h b/components/autofill/browser/phone_number_i18n.h
index 708da4525ca9e9d91dd0913902aaf82701619dfd..2da7a4b8fd5fa70912f105e61d95b80703a8fb72 100644
--- a/components/autofill/browser/phone_number_i18n.h
+++ b/components/autofill/browser/phone_number_i18n.h
@@ -29,17 +29,17 @@ namespace autofill_i18n {
// |region| should be a 2-letter country code. This is an internal function,
// exposed in the header file so that it can be tested.
bool ParsePhoneNumber(
- const string16& value,
+ const base::string16& value,
const std::string& region,
- string16* country_code,
- string16* city_code,
- string16* number,
+ base::string16* country_code,
+ base::string16* city_code,
+ base::string16* number,
i18n::phonenumbers::PhoneNumber* i18n_number) WARN_UNUSED_RESULT;
// 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);
+base::string16 NormalizePhoneNumber(const base::string16& value,
+ const std::string& region);
// Constructs whole phone number from parts.
// |city_code| - area code, could be empty.
@@ -49,23 +49,23 @@ string16 NormalizePhoneNumber(const string16& value,
// |whole_number| - constructed whole number.
// Separator characters are stripped before parsing the digits.
// Returns true if parsing was successful, false otherwise.
-bool ConstructPhoneNumber(const string16& country_code,
- const string16& city_code,
- const string16& number,
+bool ConstructPhoneNumber(const base::string16& country_code,
+ const base::string16& city_code,
+ const base::string16& number,
const std::string& region,
- string16* whole_number) WARN_UNUSED_RESULT;
+ base::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,
+bool PhoneNumbersMatch(const base::string16& number_a,
+ const base::string16& number_b,
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,
+ PhoneObject(const base::string16& number,
const std::string& region);
PhoneObject(const PhoneObject&);
PhoneObject();
@@ -73,12 +73,12 @@ class PhoneObject {
std::string region() const { return region_; }
- string16 country_code() const { return country_code_; }
- string16 city_code() const { return city_code_; }
- string16 number() const { return number_; }
+ base::string16 country_code() const { return country_code_; }
+ base::string16 city_code() const { return city_code_; }
+ base::string16 number() const { return number_; }
- string16 GetFormattedNumber() const;
- string16 GetWholeNumber() const;
+ base::string16 GetFormattedNumber() const;
+ base::string16 GetWholeNumber() const;
PhoneObject& operator=(const PhoneObject& other);
@@ -90,17 +90,17 @@ class PhoneObject {
// The parsed number and its components.
scoped_ptr<i18n::phonenumbers::PhoneNumber> i18n_number_;
- string16 city_code_;
- string16 country_code_;
- string16 number_;
+ base::string16 city_code_;
+ base::string16 country_code_;
+ base::string16 number_;
// Pretty printed version of the whole number, or empty if parsing failed.
// Set on first request.
- mutable string16 formatted_number_;
+ mutable base::string16 formatted_number_;
// The whole number, normalized to contain only digits if possible.
// Set on first request.
- mutable string16 whole_number_;
+ mutable base::string16 whole_number_;
};
} // namespace autofill_i18n

Powered by Google App Engine
This is Rietveld 408576698