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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2402983002: [TimeZoneMonitor] Decouple renderer side impl from content to blink. (Closed)
Patch Set: Rebase only Created 4 years, 1 month 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') | media/blink/BUILD.gn » ('j') | 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 cf70a2e42fb5c4701f708f39ec385c731b0c3371..d569350255fc98759f0de7ce89f7cd3374f98c42 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -160,7 +160,6 @@
#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"
@@ -326,13 +325,6 @@ void AddHistogramSample(void* hist, int sample) {
histogram->Add(sample);
}
-void NotifyTimezoneChangeOnThisThread() {
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- if (!isolate)
- return;
- v8::Date::DateTimeConfigurationChangeNotification(isolate);
-}
-
class FrameFactoryImpl : public mojom::FrameFactory {
public:
FrameFactoryImpl() : routing_id_highmark_(-1) {}
@@ -609,7 +601,6 @@ RenderThreadImpl::RenderThreadImpl(
.ConnectToBrowser(true)
.Build()),
renderer_scheduler_(std::move(scheduler)),
- time_zone_monitor_binding_(this),
categorized_worker_pool_(new CategorizedWorkerPool()),
renderer_binding_(this),
client_id_(1) {
@@ -626,7 +617,6 @@ RenderThreadImpl::RenderThreadImpl(
.ConnectToBrowser(true)
.Build()),
renderer_scheduler_(std::move(scheduler)),
- time_zone_monitor_binding_(this),
main_message_loop_(std::move(main_message_loop)),
categorized_worker_pool_(new CategorizedWorkerPool()),
renderer_binding_(this) {
@@ -900,11 +890,6 @@ void RenderThreadImpl::Init(
GetRemoteInterfaces()->GetInterface(
mojo::GetProxy(&storage_partition_service_));
- device::mojom::TimeZoneMonitorPtr time_zone_monitor;
- GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&time_zone_monitor));
- time_zone_monitor->AddClient(
- time_zone_monitor_binding_.CreateInterfacePtrAndBind());
-
#if defined(OS_LINUX)
ChildProcess::current()->SetIOThreadPriority(base::ThreadPriority::DISPLAY);
ChildThreadImpl::current()->SetThreadPriority(
@@ -1356,12 +1341,6 @@ void RenderThreadImpl::RegisterSchemes() {
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(view_source_scheme);
}
-void RenderThreadImpl::NotifyTimezoneChange() {
- NotifyTimezoneChangeOnThisThread();
- RenderThread::Get()->PostTaskToAllWebWorkers(
- base::Bind(&NotifyTimezoneChangeOnThisThread));
-}
-
void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) {
Send(new ViewHostMsg_UserMetricsRecordAction(action.str_));
}
@@ -2261,18 +2240,6 @@ void RenderThreadImpl::PurgePluginListCache(bool reload_pages) {
#endif
}
-void RenderThreadImpl::OnTimeZoneChange(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();
-}
-
void RenderThreadImpl::OnCreateNewSharedWorker(
const WorkerProcessMsg_CreateWorker_Params& params) {
// EmbeddedSharedWorkerStub will self-destruct.
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | media/blink/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698