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

Unified Diff: content/common/android/address_parser_internal.cc

Issue 113403006: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « content/common/android/address_parser_internal.h ('k') | content/common/dom_storage/dom_storage_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/android/address_parser_internal.cc
diff --git a/content/common/android/address_parser_internal.cc b/content/common/android/address_parser_internal.cc
index fe14d3b53b5df13caa99942d1b97325080c94753..b1a440d3c8b0b555ef23c6fd3a1a8a7bb5aecc35 100644
--- a/content/common/android/address_parser_internal.cc
+++ b/content/common/android/address_parser_internal.cc
@@ -20,14 +20,14 @@ const size_t kZipPlus4Digits = 9;
// Maximum number of digits of a house number, including possible hyphens.
const size_t kMaxHouseDigits = 5;
-char16 SafePreviousChar(const base::string16::const_iterator& it,
+base::char16 SafePreviousChar(const base::string16::const_iterator& it,
const base::string16::const_iterator& begin) {
if (it == begin)
return ' ';
return *(it - 1);
}
-char16 SafeNextChar(const base::string16::const_iterator& it,
+base::char16 SafeNextChar(const base::string16::const_iterator& it,
const base::string16::const_iterator& end) {
if (it == end)
return ' ';
@@ -73,11 +73,11 @@ Word::Word(const base::string16::const_iterator& begin,
DCHECK(begin <= end);
}
-bool HouseNumberParser::IsPreDelimiter(char16 character) {
+bool HouseNumberParser::IsPreDelimiter(base::char16 character) {
return character == ':' || IsPostDelimiter(character);
}
-bool HouseNumberParser::IsPostDelimiter(char16 character) {
+bool HouseNumberParser::IsPostDelimiter(base::char16 character) {
return IsWhitespace(character) || strchr(",\"'", character);
}
@@ -161,10 +161,10 @@ bool HouseNumberParser::Parse(
// There should be more than 1 character because of result_chars.
DCHECK_GT(result_chars_, 0U);
DCHECK(it_ != begin_);
- char16 previous = SafePreviousChar(it_, begin_);
+ base::char16 previous = SafePreviousChar(it_, begin_);
if (IsAsciiDigit(previous)) {
// Check cases like '12A'.
- char16 next = SafeNextChar(it_, end_);
+ base::char16 next = SafeNextChar(it_, end_);
if (IsPostDelimiter(next)) {
AcceptChars(1);
continue;
@@ -172,9 +172,9 @@ bool HouseNumberParser::Parse(
// Handle cases like 12a, 1st, 2nd, 3rd, 7th.
if (IsAsciiAlpha(next)) {
- char16 last_digit = previous;
- char16 first_letter = base::ToLowerASCII(*it_);
- char16 second_letter = base::ToLowerASCII(next);
+ base::char16 last_digit = previous;
+ base::char16 first_letter = base::ToLowerASCII(*it_);
+ base::char16 second_letter = base::ToLowerASCII(next);
bool is_teen = SafePreviousChar(it_ - 1, begin_) == '1' &&
num_digits_ == 2;
@@ -348,7 +348,7 @@ bool FindStateStartingInWord(WordList* words,
return false;
// No state names start with x, y, z.
- char16 first_letter = base::ToLowerASCII(*first_word.begin);
+ base::char16 first_letter = base::ToLowerASCII(*first_word.begin);
if (first_letter > 'w')
return false;
@@ -357,7 +357,7 @@ bool FindStateStartingInWord(WordList* words,
// Look for two-letter state names.
if (length == 2 && IsAsciiAlpha(*(first_word.begin + 1))) {
- char16 second_letter = base::ToLowerASCII(*(first_word.begin + 1));
+ base::char16 second_letter = base::ToLowerASCII(*(first_word.begin + 1));
DCHECK(second_letter >= 'a');
int second_index = second_letter - 'a';
@@ -596,7 +596,7 @@ bool IsValidLocationName(const Word& word) {
return false;
// No location names start with y, z.
- char16 first_letter = base::ToLowerASCII(*word.begin);
+ base::char16 first_letter = base::ToLowerASCII(*word.begin);
if (first_letter > 'x')
return false;
« no previous file with comments | « content/common/android/address_parser_internal.h ('k') | content/common/dom_storage/dom_storage_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698