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

Unified Diff: content/renderer/android/phone_number_detector.cc

Issue 121033002: Update uses of UTF conversions in content/ 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
Index: content/renderer/android/phone_number_detector.cc
diff --git a/content/renderer/android/phone_number_detector.cc b/content/renderer/android/phone_number_detector.cc
index 843adfaad1d810638aa39818a818560cdef57dfd..18229ddb2b2d30915f2a233724ec6ee732d88549 100644
--- a/content/renderer/android/phone_number_detector.cc
+++ b/content/renderer/android/phone_number_detector.cc
@@ -61,7 +61,7 @@ bool PhoneNumberDetector::FindContent(
size_t* end_pos,
std::string* content_text) {
base::string16 utf16_input = base::string16(begin, end);
- std::string utf8_input = UTF16ToUTF8(utf16_input);
+ std::string utf8_input = base::UTF16ToUTF8(utf16_input);
PhoneNumberMatcher matcher(utf8_input, region_code_);
if (matcher.HasNext()) {
@@ -78,8 +78,9 @@ bool PhoneNumberDetector::FindContent(
return false;
// Need to return start_pos and end_pos relative to a UTF16 encoding.
- *start_pos = UTF8ToUTF16(utf8_input.substr(0, match.start())).length();
- *end_pos = *start_pos + UTF8ToUTF16(match.raw_string()).length();
+ *start_pos =
+ base::UTF8ToUTF16(utf8_input.substr(0, match.start())).length();
+ *end_pos = *start_pos + base::UTF8ToUTF16(match.raw_string()).length();
return true;
}
« no previous file with comments | « content/renderer/android/email_detector_unittest.cc ('k') | content/renderer/android/phone_number_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698