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

Unified Diff: base/i18n/unicodestring.h

Issue 2740673002: Prepare Chromium and Blink for ICU 59 (Closed)
Patch Set: fix one more file in Blink; blink_tests can be built without any error on Linux 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/unicodestring.h
diff --git a/base/i18n/unicodestring.h b/base/i18n/unicodestring.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2db36c2d335a3eb50a807ff8050e37fc78c150e
--- /dev/null
+++ b/base/i18n/unicodestring.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_I18N_UNICODESTRING_H_
+#define BASE_I18N_UNICODESTRING_H_
+
+#include "base/strings/string16.h"
+#include "third_party/icu/source/common/unicode/unistr.h"
+
+namespace base {
+namespace i18n {
+
+inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
+ return base::string16(reinterpret_cast<const char16*>(unistr.getBuffer()),
+ static_cast<size_t>(unistr.length()));
jungshik at Google 2017/03/08 21:02:39 Strictly speaking, the above reinterpret_cast has
+}
+
+} // namespace i18n
+} // namespace base
+
+#endif // BASE_UNICODESTRING_H_
« 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