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

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

Issue 1674373003: [libphonenumber] Change DEPS to track new github mirror, uprev library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: README file Created 4 years, 10 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
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"
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/phonenumber_api.h"
14 #include "third_party/libphonenumber/src/phonenumbers/phonenumbermatch.h" 14 #include "third_party/libphonenumber/src/cpp/src/phonenumbers/phonenumbermatch.h "
15 #include "third_party/libphonenumber/src/phonenumbers/phonenumbermatcher.h" 15 #include "third_party/libphonenumber/src/cpp/src/phonenumbers/phonenumbermatcher .h"
16 #include "third_party/libphonenumber/src/phonenumbers/region_code.h" 16 #include "third_party/libphonenumber/src/cpp/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;
21 using i18n::phonenumbers::RegionCode; 21 using i18n::phonenumbers::RegionCode;
22 22
23 namespace { 23 namespace {
24 24
25 // Maximum number of characters to look around for phone number detection. 25 // Maximum number of characters to look around for phone number detection.
26 const size_t kMaximumTelephoneLength = 20; 26 const size_t kMaximumTelephoneLength = 20;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 base::UTF8ToUTF16(utf8_input.substr(0, match.start())).length(); 84 base::UTF8ToUTF16(utf8_input.substr(0, match.start())).length();
85 *end_pos = *start_pos + base::UTF8ToUTF16(match.raw_string()).length(); 85 *end_pos = *start_pos + base::UTF8ToUTF16(match.raw_string()).length();
86 86
87 return true; 87 return true;
88 } 88 }
89 89
90 return false; 90 return false;
91 } 91 }
92 92
93 } // namespace content 93 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698