OLD | NEW |
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 Loading... |
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 |
OLD | NEW |