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

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

Issue 2740673002: Prepare Chromium and Blink for ICU 59 (Closed)
Patch Set: revert accidental revert of sftnly roll during rebase Created 3 years, 9 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/email_detector.h" 5 #include "content/renderer/android/email_detector.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 UErrorCode status = U_ZERO_ERROR; 55 UErrorCode status = U_ZERO_ERROR;
56 std::unique_ptr<icu::RegexMatcher> matcher( 56 std::unique_ptr<icu::RegexMatcher> matcher(
57 new icu::RegexMatcher(pattern, input, UREGEX_CASE_INSENSITIVE, status)); 57 new icu::RegexMatcher(pattern, input, UREGEX_CASE_INSENSITIVE, status));
58 if (matcher->find()) { 58 if (matcher->find()) {
59 *start_pos = matcher->start(status); 59 *start_pos = matcher->start(status);
60 DCHECK(U_SUCCESS(status)); 60 DCHECK(U_SUCCESS(status));
61 *end_pos = matcher->end(status); 61 *end_pos = matcher->end(status);
62 DCHECK(U_SUCCESS(status)); 62 DCHECK(U_SUCCESS(status));
63 icu::UnicodeString content_ustr(matcher->group(status)); 63 icu::UnicodeString content_ustr(matcher->group(status));
64 DCHECK(U_SUCCESS(status)); 64 DCHECK(U_SUCCESS(status));
65 base::UTF16ToUTF8(content_ustr.getBuffer(), content_ustr.length(), 65 content_text->clear();
66 content_text); 66 content_ustr.toUTF8String(*content_text);
67 return true; 67 return true;
68 } 68 }
69 69
70 return false; 70 return false;
71 } 71 }
72 72
73 } // namespace content 73 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/date_time_chooser_android.cc ('k') | ios/chrome/browser/notification_promo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698