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

Unified Diff: chrome/browser/chromeos/system/timezone_util.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/i18n/unicodestring.h ('k') | chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/timezone_util.cc
diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc
index 6c41a052197a959f10c4e38fe4cc56e6c39ca149..d01f60e03b9fa460b7d67a6f535f2d3393327db2 100644
--- a/chrome/browser/chromeos/system/timezone_util.cc
+++ b/chrome/browser/chromeos/system/timezone_util.cc
@@ -11,6 +11,7 @@
#include <utility>
#include "base/i18n/rtl.h"
+#include "base/i18n/unicodestring.h"
#include "base/lazy_instance.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
@@ -77,7 +78,7 @@ base::string16 GetExemplarCity(const icu::TimeZone& zone) {
if (!U_FAILURE(status)) {
city = icu::ures_getUnicodeStringByKey(zone_item.get(), "ec", &status);
if (U_SUCCESS(status))
- return base::string16(city.getBuffer(), city.length());
+ return base::i18n::UnicodeStringToString16(city);
}
// Fallback case in case of failure.
@@ -135,8 +136,7 @@ base::string16 GetTimezoneName(const icu::TimeZone& timezone) {
}
base::string16 result(l10n_util::GetStringFUTF16(
IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_TEMPLATE,
- base::ASCIIToUTF16(offset_str),
- base::string16(name.getBuffer(), name.length()),
+ base::ASCIIToUTF16(offset_str), base::i18n::UnicodeStringToString16(name),
GetExemplarCity(timezone)));
base::i18n::AdjustStringForLocaleDirection(&result);
return result;
« no previous file with comments | « base/i18n/unicodestring.h ('k') | chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698