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

Side by Side Diff: tools/ipc_fuzzer/message_replay/replay_process.cc

Issue 2620633004: Remove mojo::edk::test::ScopedIPCSupport (Closed)
Patch Set: . Created 3 years, 11 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 | « third_party/WebKit/Source/platform/testing/RunAllTests.cpp ('k') | url/DEPS » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "tools/ipc_fuzzer/message_replay/replay_process.h" 5 #include "tools/ipc_fuzzer/message_replay/replay_process.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 io_thread_.StartWithOptions( 86 io_thread_.StartWithOptions(
87 base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); 87 base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
88 88
89 #if defined(OS_POSIX) 89 #if defined(OS_POSIX)
90 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance(); 90 base::GlobalDescriptors* g_fds = base::GlobalDescriptors::GetInstance();
91 g_fds->Set(kMojoIPCChannel, 91 g_fds->Set(kMojoIPCChannel,
92 kMojoIPCChannel + base::GlobalDescriptors::kBaseDescriptor); 92 kMojoIPCChannel + base::GlobalDescriptors::kBaseDescriptor);
93 #endif 93 #endif
94 94
95 mojo_ipc_support_.reset( 95 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
96 new mojo::edk::ScopedIPCSupport(io_thread_.task_runner())); 96 io_thread_.task_runner(),
97 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST));
97 InitializeMojoIPCChannel(); 98 InitializeMojoIPCChannel();
98 99
99 return true; 100 return true;
100 } 101 }
101 102
102 void ReplayProcess::OpenChannel() { 103 void ReplayProcess::OpenChannel() {
103 channel_ = IPC::ChannelProxy::Create( 104 channel_ = IPC::ChannelProxy::Create(
104 IPC::ChannelMojo::CreateClientFactory( 105 IPC::ChannelMojo::CreateClientFactory(
105 mojo::edk::CreateChildMessagePipe( 106 mojo::edk::CreateChildMessagePipe(
106 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 107 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return true; 147 return true;
147 } 148 }
148 149
149 void ReplayProcess::OnChannelError() { 150 void ReplayProcess::OnChannelError() {
150 LOG(ERROR) << "Channel error, quitting after " 151 LOG(ERROR) << "Channel error, quitting after "
151 << message_index_ << " messages"; 152 << message_index_ << " messages";
152 base::MessageLoop::current()->QuitWhenIdle(); 153 base::MessageLoop::current()->QuitWhenIdle();
153 } 154 }
154 155
155 } // namespace ipc_fuzzer 156 } // namespace ipc_fuzzer
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/RunAllTests.cpp ('k') | url/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698