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

Side by Side Diff: base/i18n/unicodestring.h

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
« no previous file with comments | « base/i18n/timezone.cc ('k') | chrome/browser/chromeos/system/timezone_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_I18N_UNICODESTRING_H_
6 #define BASE_I18N_UNICODESTRING_H_
7
8 #include "base/strings/string16.h"
9 #include "third_party/icu/source/common/unicode/unistr.h"
10 #include "third_party/icu/source/common/unicode/uvernum.h"
11
12 #if U_ICU_VERSION_MAJOR_NUM >= 59
13 #include "third_party/icu/source/common/unicode/char16ptr.h"
14 #endif
15
16 namespace base {
17 namespace i18n {
18
19 inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
20 #if U_ICU_VERSION_MAJOR_NUM >= 59
21 return base::string16(icu::toUCharPtr(unistr.getBuffer()),
22 static_cast<size_t>(unistr.length()));
23 #else
24 return base::string16(unistr.getBuffer(),
25 static_cast<size_t>(unistr.length()));
26 #endif
27 }
28
29 } // namespace i18n
30 } // namespace base
31
32 #endif // BASE_UNICODESTRING_H_
OLDNEW
« no previous file with comments | « base/i18n/timezone.cc ('k') | chrome/browser/chromeos/system/timezone_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698