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

Side by Side Diff: trunk/src/tools/ipc_fuzzer/replay/replay_process.cc

Issue 312553004: Revert 274310 "Introduce IPC::ChannelProxy::Create*() and IPC::S..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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/replay/replay_process.h" 5 #include "tools/ipc_fuzzer/replay/replay_process.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string> 8 #include <string>
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 g_fds->Set(kPrimaryIPCChannel, 48 g_fds->Set(kPrimaryIPCChannel,
49 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); 49 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor);
50 return true; 50 return true;
51 } 51 }
52 52
53 void ReplayProcess::OpenChannel() { 53 void ReplayProcess::OpenChannel() {
54 std::string channel_name = 54 std::string channel_name =
55 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 55 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
56 switches::kProcessChannelID); 56 switches::kProcessChannelID);
57 57
58 channel_ = IPC::ChannelProxy::CreateClient( 58 channel_.reset(
59 channel_name, this, io_thread_.message_loop_proxy()); 59 new IPC::ChannelProxy(channel_name,
60 IPC::Channel::MODE_CLIENT,
61 this,
62 io_thread_.message_loop_proxy()));
60 } 63 }
61 64
62 bool ReplayProcess::OpenTestcase() { 65 bool ReplayProcess::OpenTestcase() {
63 base::FilePath path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( 66 base::FilePath path = CommandLine::ForCurrentProcess()->GetSwitchValuePath(
64 switches::kIpcFuzzerTestcase); 67 switches::kIpcFuzzerTestcase);
65 return MessageFile::Read(path, &messages_); 68 return MessageFile::Read(path, &messages_);
66 } 69 }
67 70
68 void ReplayProcess::SendNextMessage() { 71 void ReplayProcess::SendNextMessage() {
69 if (message_index_ >= messages_.size()) { 72 if (message_index_ >= messages_.size()) {
(...skipping 25 matching lines...) Expand all
95 return true; 98 return true;
96 } 99 }
97 100
98 void ReplayProcess::OnChannelError() { 101 void ReplayProcess::OnChannelError() {
99 LOG(ERROR) << "Channel error, quitting after " 102 LOG(ERROR) << "Channel error, quitting after "
100 << message_index_ << " messages"; 103 << message_index_ << " messages";
101 base::MessageLoop::current()->Quit(); 104 base::MessageLoop::current()->Quit();
102 } 105 }
103 106
104 } // namespace ipc_fuzzer 107 } // namespace ipc_fuzzer
OLDNEW
« no previous file with comments | « trunk/src/remoting/host/win/worker_process_launcher_unittest.cc ('k') | trunk/src/win8/metro_driver/chrome_app_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698