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

Unified Diff: content/child/child_thread.cc

Issue 25008006: Flush out initial [un]registerServiceWorker roundtrip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 14ba2ccea0835c1747d263b98b00841e1c4eee5c..c96a60b97c917586f6c6e14957219ec410a201e6 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -4,6 +4,8 @@
#include "content/child/child_thread.h"
+#include <string>
kinuko 2013/09/30 12:41:17 is this needed?
alecflett 2013/10/01 00:17:04 Yes, IWYU (Include What You Use) says you should #
kinuko 2013/10/01 07:48:11 Oh, ok so this is not really for this change but t
+
#include "base/allocator/allocator_extension.h"
#include "base/base_switches.h"
#include "base/command_line.h"
@@ -23,6 +25,8 @@
#include "content/child/quota_dispatcher.h"
#include "content/child/quota_message_filter.h"
#include "content/child/resource_dispatcher.h"
+#include "content/child/service_worker/service_worker_dispatcher.h"
+#include "content/child/service_worker/service_worker_message_filter.h"
#include "content/child/socket_stream_dispatcher.h"
#include "content/child/thread_safe_sender.h"
#include "content/child/websocket_dispatcher.h"
@@ -154,6 +158,11 @@ void ChildThread::Init() {
resource_message_filter_ =
new ChildResourceMessageFilter(resource_dispatcher());
+ service_worker_message_filter_ =
+ new ServiceWorkerMessageFilter(thread_safe_sender_.get());
+ service_worker_dispatcher_.reset(new ServiceWorkerDispatcher(
+ thread_safe_sender_.get(), service_worker_message_filter_));
+
quota_message_filter_ =
new QuotaMessageFilter(thread_safe_sender_.get());
quota_dispatcher_.reset(new QuotaDispatcher(thread_safe_sender_.get(),
@@ -165,6 +174,7 @@ void ChildThread::Init() {
ChildProcess::current()->io_message_loop_proxy()));
channel_->AddFilter(resource_message_filter_.get());
channel_->AddFilter(quota_message_filter_.get());
+ channel_->AddFilter(service_worker_message_filter_.get());
// In single process mode we may already have a power monitor
if (!base::PowerMonitor::Get()) {
@@ -221,6 +231,7 @@ ChildThread::~ChildThread() {
#endif
channel_->RemoveFilter(quota_message_filter_.get());
+ channel_->RemoveFilter(service_worker_message_filter_.get());
channel_->RemoveFilter(histogram_message_filter_.get());
channel_->RemoveFilter(sync_message_filter_.get());

Powered by Google App Engine
This is Rietveld 408576698