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

Side by Side 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, 7 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 | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #include "third_party/WebKit/public/web/WebDocument.h" 130 #include "third_party/WebKit/public/web/WebDocument.h"
131 #include "third_party/WebKit/public/web/WebFrame.h" 131 #include "third_party/WebKit/public/web/WebFrame.h"
132 #include "third_party/WebKit/public/web/WebImageCache.h" 132 #include "third_party/WebKit/public/web/WebImageCache.h"
133 #include "third_party/WebKit/public/web/WebKit.h" 133 #include "third_party/WebKit/public/web/WebKit.h"
134 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" 134 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h"
135 #include "third_party/WebKit/public/web/WebPopupMenu.h" 135 #include "third_party/WebKit/public/web/WebPopupMenu.h"
136 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 136 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
137 #include "third_party/WebKit/public/web/WebScriptController.h" 137 #include "third_party/WebKit/public/web/WebScriptController.h"
138 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 138 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
139 #include "third_party/WebKit/public/web/WebView.h" 139 #include "third_party/WebKit/public/web/WebView.h"
140 #include "third_party/icu/source/i18n/unicode/timezone.h"
140 #include "third_party/skia/include/core/SkGraphics.h" 141 #include "third_party/skia/include/core/SkGraphics.h"
141 #include "ui/base/layout.h" 142 #include "ui/base/layout.h"
142 #include "ui/base/ui_base_switches.h" 143 #include "ui/base/ui_base_switches.h"
143 #include "v8/include/v8.h" 144 #include "v8/include/v8.h"
144 145
145 #if defined(OS_ANDROID) 146 #if defined(OS_ANDROID)
146 #include <cpu-features.h> 147 #include <cpu-features.h>
147 #include "content/renderer/android/synchronous_compositor_factory.h" 148 #include "content/renderer/android/synchronous_compositor_factory.h"
148 #include "content/renderer/media/android/renderer_demuxer_android.h" 149 #include "content/renderer/media/android/renderer_demuxer_android.h"
149 #endif 150 #endif
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 RenderProcessObserver, observers_, NetworkStateChanged(online)); 1705 RenderProcessObserver, observers_, NetworkStateChanged(online));
1705 WebNetworkStateNotifier::setWebConnectionType( 1706 WebNetworkStateNotifier::setWebConnectionType(
1706 NetConnectionTypeToWebConnectionType(type)); 1707 NetConnectionTypeToWebConnectionType(type));
1707 } 1708 }
1708 1709
1709 void RenderThreadImpl::OnTempCrashWithData(const GURL& data) { 1710 void RenderThreadImpl::OnTempCrashWithData(const GURL& data) {
1710 GetContentClient()->SetActiveURL(data); 1711 GetContentClient()->SetActiveURL(data);
1711 CHECK(false); 1712 CHECK(false);
1712 } 1713 }
1713 1714
1714 void RenderThreadImpl::OnUpdateTimezone() { 1715 void RenderThreadImpl::OnUpdateTimezone(const std::string& zone_id) {
1715 if (!blink_platform_impl_) 1716 if (!blink_platform_impl_)
1716 return; 1717 return;
1718 if (!zone_id.empty()) {
1719 icu::TimeZone *new_zone = icu::TimeZone::createTimeZone(
1720 icu::UnicodeString::fromUTF8(zone_id));
1721 icu::TimeZone::adoptDefault(new_zone);
1722 VLOG(1) << "ICU default timezone is set to " << zone_id;
1723 }
1717 NotifyTimezoneChange(); 1724 NotifyTimezoneChange();
1718 } 1725 }
1719 1726
1720 #if defined(OS_ANDROID) 1727 #if defined(OS_ANDROID)
1721 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) { 1728 void RenderThreadImpl::OnSetWebKitSharedTimersSuspended(bool suspend) {
1722 if (suspend_webkit_shared_timer_) { 1729 if (suspend_webkit_shared_timer_) {
1723 EnsureWebKitInitialized(); 1730 EnsureWebKitInitialized();
1724 // TODO(alexclarke): Remove the shared timer. 1731 // TODO(alexclarke): Remove the shared timer.
1725 if (suspend) { 1732 if (suspend) {
1726 blink_platform_impl_->SuspendSharedTimer(); 1733 blink_platform_impl_->SuspendSharedTimer();
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 } 1902 }
1896 1903
1897 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1904 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1898 size_t erased = 1905 size_t erased =
1899 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1906 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1900 routing_id_); 1907 routing_id_);
1901 DCHECK_EQ(1u, erased); 1908 DCHECK_EQ(1u, erased);
1902 } 1909 }
1903 1910
1904 } // namespace content 1911 } // namespace content
OLDNEW
« 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