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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 697203006: Update the ICU's default timezone in render (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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 | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index acda8a70f33dea4c697f4dadd93a8e3e830c7042..896d5cbfb0da1048310e6272b709ac1c591c3f26 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -137,6 +137,7 @@
#include "third_party/WebKit/public/web/WebScriptController.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "third_party/skia/include/core/SkGraphics.h"
#include "ui/base/layout.h"
#include "ui/base/ui_base_switches.h"
@@ -1711,9 +1712,15 @@ void RenderThreadImpl::OnTempCrashWithData(const GURL& data) {
CHECK(false);
}
-void RenderThreadImpl::OnUpdateTimezone() {
+void RenderThreadImpl::OnUpdateTimezone(const std::string& zone_id) {
if (!blink_platform_impl_)
return;
+ if (!zone_id.empty()) {
+ icu::TimeZone *new_zone = icu::TimeZone::createTimeZone(
+ icu::UnicodeString::fromUTF8(zone_id));
+ icu::TimeZone::adoptDefault(new_zone);
+ VLOG(1) << "ICU default timezone is set to " << zone_id;
+ }
NotifyTimezoneChange();
}
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698