Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 3d713e06ac3cd17331275ad4d832264e3a09c043..3a87450e835546cc2121e5cc648d92e58df48645 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" |
@@ -1695,9 +1696,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 *defaultZone = icu::TimeZone::createTimeZone( |
+ icu::UnicodeString::fromUTF8(zone_id)); |
+ icu::TimeZone::adoptDefault(defaultZone); |
jungshik at Google
2015/04/10 00:23:44
adoptDefault() is not thread-safe. If this is call
jochen (gone - plz use gerrit)
2015/04/10 12:17:24
can we make it thread safe?
jungshik at Google
2015/04/24 22:40:53
It turned out that I was mistaken about this part.
|
+ VLOG(0) << "ICU dflt timezone is set to " << zone_id; |
+ } |
NotifyTimezoneChange(); |
} |