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

Side by Side Diff: content/renderer/android/phone_number_detector.cc

Issue 448143008: Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/renderer/android/phone_number_detector.h" 5 #include "content/renderer/android/phone_number_detector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 18 matching lines...) Expand all
29 29
30 namespace content { 30 namespace content {
31 31
32 PhoneNumberDetector::PhoneNumberDetector() 32 PhoneNumberDetector::PhoneNumberDetector()
33 : region_code_(RegionCode::GetUnknown()) { 33 : region_code_(RegionCode::GetUnknown()) {
34 } 34 }
35 35
36 // Region should be empty or an ISO 3166-1 alpha-2 country code. 36 // Region should be empty or an ISO 3166-1 alpha-2 country code.
37 PhoneNumberDetector::PhoneNumberDetector(const std::string& region) 37 PhoneNumberDetector::PhoneNumberDetector(const std::string& region)
38 : region_code_(region.empty() ? RegionCode::GetUnknown() 38 : region_code_(region.empty() ? RegionCode::GetUnknown()
39 : StringToUpperASCII(region)) { 39 : base::StringToUpperASCII(region)) {
40 } 40 }
41 41
42 PhoneNumberDetector::~PhoneNumberDetector() { 42 PhoneNumberDetector::~PhoneNumberDetector() {
43 } 43 }
44 44
45 size_t PhoneNumberDetector::GetMaximumContentLength() { 45 size_t PhoneNumberDetector::GetMaximumContentLength() {
46 return kMaximumTelephoneLength; 46 return kMaximumTelephoneLength;
47 } 47 }
48 48
49 GURL PhoneNumberDetector::GetIntentURL(const std::string& content_text) { 49 GURL PhoneNumberDetector::GetIntentURL(const std::string& content_text) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 base::UTF8ToUTF16(utf8_input.substr(0, match.start())).length(); 82 base::UTF8ToUTF16(utf8_input.substr(0, match.start())).length();
83 *end_pos = *start_pos + base::UTF8ToUTF16(match.raw_string()).length(); 83 *end_pos = *start_pos + base::UTF8ToUTF16(match.raw_string()).length();
84 84
85 return true; 85 return true;
86 } 86 }
87 87
88 return false; 88 return false;
89 } 89 }
90 90
91 } // namespace content 91 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/accessibility/blink_ax_tree_source.cc ('k') | content/renderer/dom_serializer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698