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

Side by Side Diff: remoting/host/win/worker_process_launcher_unittest.cc

Issue 11231060: [Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/win/scoped_handle.h" 9 #include "base/win/scoped_handle.h"
10 #include "ipc/ipc_channel.h" 10 #include "ipc/ipc_channel.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 EXPECT_TRUE(result); 192 EXPECT_TRUE(result);
193 } 193 }
194 194
195 bool WorkerProcessLauncherTest::LaunchProcess( 195 bool WorkerProcessLauncherTest::LaunchProcess(
196 IPC::Listener* delegate, 196 IPC::Listener* delegate,
197 ScopedHandle* process_exit_event_out) { 197 ScopedHandle* process_exit_event_out) {
198 process_exit_event_.Set(CreateEvent(NULL, TRUE, FALSE, NULL)); 198 process_exit_event_.Set(CreateEvent(NULL, TRUE, FALSE, NULL));
199 if (!process_exit_event_.IsValid()) 199 if (!process_exit_event_.IsValid())
200 return false; 200 return false;
201 201
202 channel_name_ = GenerateIpcChannelName(this); 202 channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID();
203 ScopedHandle pipe; 203 ScopedHandle pipe;
204 if (!CreateIpcChannel(channel_name_, kIpcSecurityDescriptor, &pipe)) { 204 if (!CreateIpcChannel(channel_name_, kIpcSecurityDescriptor, &pipe)) {
205 return false; 205 return false;
206 } 206 }
207 207
208 // Wrap the pipe into an IPC channel. 208 // Wrap the pipe into an IPC channel.
209 channel_server_.reset(new IPC::ChannelProxy( 209 channel_server_.reset(new IPC::ChannelProxy(
210 IPC::ChannelHandle(pipe), 210 IPC::ChannelHandle(pipe),
211 IPC::Channel::MODE_SERVER, 211 IPC::Channel::MODE_SERVER,
212 delegate, 212 delegate,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 .Times(0); 387 .Times(0);
388 EXPECT_CALL(ipc_delegate_, OnPermanentError()) 388 EXPECT_CALL(ipc_delegate_, OnPermanentError())
389 .Times(0); 389 .Times(0);
390 390
391 client_pid_ = GetCurrentProcessId() + 4; 391 client_pid_ = GetCurrentProcessId() + 4;
392 StartWorker(); 392 StartWorker();
393 message_loop_.Run(); 393 message_loop_.Run();
394 } 394 }
395 395
396 } // namespace remoting 396 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/worker_process_launcher.cc ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698