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

Side by Side Diff: content/test/render_thread_impl_browser_test_ipc_helper.cc

Issue 1054253005: ChannelMojo: Ensure that it always has ScopedIPCSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the ipc_fuzzer breakage Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | ipc/mojo/ipc_channel_mojo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/render_thread_impl_browser_test_ipc_helper.h" 5 #include "content/test/render_thread_impl_browser_test_ipc_helper.h"
6 6
7 #include "content/common/mojo/channel_init.h" 7 #include "content/common/mojo/channel_init.h"
8 #include "ipc/mojo/ipc_channel_mojo_host.h" 8 #include "ipc/mojo/ipc_channel_mojo_host.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 InitializeMojo(); 47 InitializeMojo();
48 48
49 ipc_support_.reset(new IPC::ScopedIPCSupport(ipc_thread_->task_runner())); 49 ipc_support_.reset(new IPC::ScopedIPCSupport(ipc_thread_->task_runner()));
50 mojo_host_.reset(new IPC::ChannelMojoHost(ipc_thread_->task_runner())); 50 mojo_host_.reset(new IPC::ChannelMojoHost(ipc_thread_->task_runner()));
51 mojo_application_host_.reset(new MojoApplicationHost()); 51 mojo_application_host_.reset(new MojoApplicationHost());
52 mojo_application_host_->OverrideIOTaskRunnerForTest( 52 mojo_application_host_->OverrideIOTaskRunnerForTest(
53 ipc_thread_->task_runner()); 53 ipc_thread_->task_runner());
54 54
55 channel_ = IPC::ChannelProxy::Create( 55 channel_ = IPC::ChannelProxy::Create(
56 IPC::ChannelMojo::CreateServerFactory(mojo_host_->channel_delegate(), 56 IPC::ChannelMojo::CreateServerFactory(mojo_host_->channel_delegate(),
57 ipc_thread_->task_runner(),
57 channel_id_), 58 channel_id_),
58 dummy_listener_.get(), ipc_thread_->task_runner()); 59 dummy_listener_.get(), ipc_thread_->task_runner());
59 60
60 mojo_application_host_->Init(); 61 mojo_application_host_->Init();
61 mojo_application_host_->Activate(channel_.get(), 62 mojo_application_host_->Activate(channel_.get(),
62 base::GetCurrentProcessHandle()); 63 base::GetCurrentProcessHandle());
63 mojo_host_->OnClientLaunched(base::GetCurrentProcessHandle()); 64 mojo_host_->OnClientLaunched(base::GetCurrentProcessHandle());
64 } 65 }
65 66
66 scoped_refptr<base::SingleThreadTaskRunner> 67 scoped_refptr<base::SingleThreadTaskRunner>
67 RenderThreadImplBrowserIPCTestHelper::GetIOTaskRunner() const { 68 RenderThreadImplBrowserIPCTestHelper::GetIOTaskRunner() const {
68 return ipc_thread_->task_runner(); 69 return ipc_thread_->task_runner();
69 } 70 }
70 71
71 } // namespace content 72 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | ipc/mojo/ipc_channel_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698