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

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

Issue 16408017: Use a direct include of utf_string_conversions.h in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "content/public/renderer/android_content_detection_prefixes.h" 11 #include "content/public/renderer/android_content_detection_prefixes.h"
12 #include "net/base/escape.h" 12 #include "net/base/escape.h"
13 #include "third_party/libphonenumber/src/phonenumber_api.h" 13 #include "third_party/libphonenumber/src/phonenumber_api.h"
14 #include "third_party/libphonenumber/src/phonenumbers/phonenumbermatch.h" 14 #include "third_party/libphonenumber/src/phonenumbers/phonenumbermatch.h"
15 #include "third_party/libphonenumber/src/phonenumbers/phonenumbermatcher.h" 15 #include "third_party/libphonenumber/src/phonenumbers/phonenumbermatcher.h"
16 #include "third_party/libphonenumber/src/phonenumbers/region_code.h" 16 #include "third_party/libphonenumber/src/phonenumbers/region_code.h"
17 17
18 using i18n::phonenumbers::PhoneNumberMatch; 18 using i18n::phonenumbers::PhoneNumberMatch;
19 using i18n::phonenumbers::PhoneNumberMatcher; 19 using i18n::phonenumbers::PhoneNumberMatcher;
20 using i18n::phonenumbers::PhoneNumberUtil; 20 using i18n::phonenumbers::PhoneNumberUtil;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 *start_pos = UTF8ToUTF16(utf8_input.substr(0, match.start())).length(); 80 *start_pos = UTF8ToUTF16(utf8_input.substr(0, match.start())).length();
81 *end_pos = *start_pos + UTF8ToUTF16(match.raw_string()).length(); 81 *end_pos = *start_pos + UTF8ToUTF16(match.raw_string()).length();
82 82
83 return true; 83 return true;
84 } 84 }
85 85
86 return false; 86 return false;
87 } 87 }
88 88
89 } // namespace content 89 } // namespace content
OLDNEW
« 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