Index: content/browser/service_worker/embedded_worker_test_helper.cc |
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc |
index da005712c138d692db181626ac7919d4dffb16f9..750fc969128150e4ea760a2daa7c4df0fb295ad0 100644 |
--- a/content/browser/service_worker/embedded_worker_test_helper.cc |
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc |
@@ -15,7 +15,6 @@ |
#include "base/memory/ptr_util.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "base/time/time.h" |
-#include "content/browser/message_port_message_filter.h" |
#include "content/browser/service_worker/embedded_worker_instance.h" |
#include "content/browser/service_worker/embedded_worker_registry.h" |
#include "content/browser/service_worker/embedded_worker_status.h" |
@@ -37,28 +36,6 @@ |
namespace content { |
-namespace { |
- |
-class MockMessagePortMessageFilter : public MessagePortMessageFilter { |
- public: |
- MockMessagePortMessageFilter() |
- : MessagePortMessageFilter( |
- base::Bind(&base::AtomicSequenceNumber::GetNext, |
- base::Unretained(&next_routing_id_))) {} |
- |
- bool Send(IPC::Message* message) override { |
- message_queue_.push_back(base::WrapUnique(message)); |
- return true; |
- } |
- |
- private: |
- ~MockMessagePortMessageFilter() override {} |
- base::AtomicSequenceNumber next_routing_id_; |
- std::vector<std::unique_ptr<IPC::Message>> message_queue_; |
-}; |
- |
-} // namespace |
- |
EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient:: |
MockEmbeddedWorkerInstanceClient( |
base::WeakPtr<EmbeddedWorkerTestHelper> helper) |
@@ -213,8 +190,7 @@ EmbeddedWorkerTestHelper::EmbeddedWorkerTestHelper( |
base::ThreadTaskRunnerHandle::Get(), nullptr, nullptr); |
wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id()); |
wrapper_->process_manager()->SetNewProcessIdForTest(new_render_process_id()); |
- registry()->AddChildProcessSender(mock_render_process_id_, this, |
- NewMessagePortMessageFilter()); |
+ registry()->AddChildProcessSender(mock_render_process_id_, this); |
// Setup process level interface registry. |
render_process_interface_registry_ = |
@@ -230,8 +206,7 @@ EmbeddedWorkerTestHelper::~EmbeddedWorkerTestHelper() { |
void EmbeddedWorkerTestHelper::SimulateAddProcessToPattern(const GURL& pattern, |
int process_id) { |
- registry()->AddChildProcessSender(process_id, this, |
- NewMessagePortMessageFilter()); |
+ registry()->AddChildProcessSender(process_id, this); |
wrapper_->process_manager()->AddProcessReferenceToPattern(pattern, |
process_id); |
} |
@@ -564,14 +539,6 @@ EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { |
return context()->embedded_worker_registry(); |
} |
-MessagePortMessageFilter* |
-EmbeddedWorkerTestHelper::NewMessagePortMessageFilter() { |
- scoped_refptr<MessagePortMessageFilter> filter( |
- new MockMessagePortMessageFilter); |
- message_port_message_filters_.push_back(filter); |
- return filter.get(); |
-} |
- |
std::unique_ptr<service_manager::InterfaceRegistry> |
EmbeddedWorkerTestHelper::CreateInterfaceRegistry(MockRenderProcessHost* rph) { |
auto registry = |