Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 92b21326af7813203bad589fd65de70f164fe1ab..a8cefbf4a754ec24060265ba91e1d8d10250d823 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -120,6 +120,7 @@ |
#include "content/browser/speech/speech_recognition_dispatcher_host.h" |
#include "content/browser/storage_partition_impl.h" |
#include "content/browser/streams/stream_context.h" |
+#include "content/browser/time_zone_monitor.h" |
#include "content/browser/tracing/trace_message_filter.h" |
#include "content/browser/websockets/websocket_manager.h" |
#include "content/browser/webui/web_ui_controller_factory_registry.h" |
@@ -1240,6 +1241,16 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); |
} |
+ // BrowserMainLoop, which owns TimeZoneMonitor, is alive for the lifetime of |
+ // Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(), |
+ // which shuts down Mojo). Hence, passing that TimeZoneMonitor instance as |
+ // a raw pointer here is safe. |
+ AddUIThreadInterface( |
+ registry.get(), |
+ base::Bind(&TimeZoneMonitor::Bind, |
+ base::Unretained( |
+ BrowserMainLoop::GetInstance()->time_zone_monitor()))); |
+ |
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = |
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); |
registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), |
@@ -1313,10 +1324,6 @@ void RenderProcessHostImpl::ResumeDeferredNavigation( |
widget_helper_->ResumeDeferredNavigation(request_id); |
} |
-void RenderProcessHostImpl::NotifyTimezoneChange(const std::string& zone_id) { |
- Send(new ViewMsg_TimezoneChange(zone_id)); |
-} |
- |
shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() { |
return mojo_child_connection_->GetRemoteInterfaces(); |
} |