| 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/email_detector.h" | 5 #include "content/renderer/android/email_detector.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/public/renderer/android_content_detection_prefixes.h" | 10 #include "content/public/renderer/android_content_detection_prefixes.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 input, | 56 input, |
| 57 UREGEX_CASE_INSENSITIVE, | 57 UREGEX_CASE_INSENSITIVE, |
| 58 status)); | 58 status)); |
| 59 if (matcher->find()) { | 59 if (matcher->find()) { |
| 60 *start_pos = matcher->start(status); | 60 *start_pos = matcher->start(status); |
| 61 DCHECK(U_SUCCESS(status)); | 61 DCHECK(U_SUCCESS(status)); |
| 62 *end_pos = matcher->end(status); | 62 *end_pos = matcher->end(status); |
| 63 DCHECK(U_SUCCESS(status)); | 63 DCHECK(U_SUCCESS(status)); |
| 64 icu::UnicodeString content_ustr(matcher->group(status)); | 64 icu::UnicodeString content_ustr(matcher->group(status)); |
| 65 DCHECK(U_SUCCESS(status)); | 65 DCHECK(U_SUCCESS(status)); |
| 66 UTF16ToUTF8(content_ustr.getBuffer(), content_ustr.length(), content_text); | 66 base::UTF16ToUTF8(content_ustr.getBuffer(), content_ustr.length(), |
| 67 content_text); |
| 67 return true; | 68 return true; |
| 68 } | 69 } |
| 69 | 70 |
| 70 return false; | 71 return false; |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace content | 74 } // namespace content |
| OLD | NEW |