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

Unified Diff: content/test/render_thread_impl_browser_test_ipc_helper.cc

Issue 2226403002: Remove Channel token from InProcessChildThreadParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moar-channels
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « content/test/render_thread_impl_browser_test_ipc_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/render_thread_impl_browser_test_ipc_helper.cc
diff --git a/content/test/render_thread_impl_browser_test_ipc_helper.cc b/content/test/render_thread_impl_browser_test_ipc_helper.cc
deleted file mode 100644
index 171e08537ab79a4562274836598294e06b322b25..0000000000000000000000000000000000000000
--- a/content/test/render_thread_impl_browser_test_ipc_helper.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/test/render_thread_impl_browser_test_ipc_helper.h"
-
-#include "mojo/edk/embedder/embedder.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace content {
-
-class RenderThreadImplBrowserIPCTestHelper::DummyListener
- : public IPC::Listener {
- public:
- bool OnMessageReceived(const IPC::Message& message) override { return true; }
-};
-
-RenderThreadImplBrowserIPCTestHelper::RenderThreadImplBrowserIPCTestHelper() {
- message_loop_.reset(new base::MessageLoopForIO());
-
- channel_id_ = IPC::Channel::GenerateVerifiedChannelID("");
- dummy_listener_.reset(new DummyListener());
-
- SetupIpcThread();
- SetupMojo();
-}
-
-RenderThreadImplBrowserIPCTestHelper::~RenderThreadImplBrowserIPCTestHelper() {
-}
-
-void RenderThreadImplBrowserIPCTestHelper::SetupIpcThread() {
- ipc_thread_.reset(new base::Thread("test_ipc_thread"));
- base::Thread::Options options;
- options.message_loop_type = base::MessageLoop::TYPE_IO;
- ASSERT_TRUE(ipc_thread_->StartWithOptions(options));
-}
-
-void RenderThreadImplBrowserIPCTestHelper::SetupMojo() {
- InitializeMojo();
-
- std::string child_token = mojo::edk::GenerateRandomToken();
- ipc_support_.reset(
- new mojo::edk::test::ScopedIPCSupport(ipc_thread_->task_runner()));
- mojo_application_token_ = mojo::edk::GenerateRandomToken();
-
- mojo_ipc_token_ = mojo::edk::GenerateRandomToken();
-
- mojo::MessagePipe pipe;
- channel_ = IPC::ChannelProxy::Create(
- IPC::ChannelMojo::CreateServerFactory(
- mojo::edk::CreateParentMessagePipe(mojo_ipc_token_, child_token),
- ipc_thread_->task_runner()),
- dummy_listener_.get(), ipc_thread_->task_runner());
-}
-
-scoped_refptr<base::SingleThreadTaskRunner>
-RenderThreadImplBrowserIPCTestHelper::GetIOTaskRunner() const {
- return ipc_thread_->task_runner();
-}
-
-} // namespace content
« no previous file with comments | « content/test/render_thread_impl_browser_test_ipc_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698