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

Side by Side Diff: remoting/host/win/worker_process_launcher.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: Fixup 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 "remoting/host/win/worker_process_launcher.h" 5 #include "remoting/host/win/worker_process_launcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/timer.h" 10 #include "base/timer.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // trusted. 221 // trusted.
222 DWORD actual_pid = launcher_delegate_->GetProcessId(); 222 DWORD actual_pid = launcher_delegate_->GetProcessId();
223 if (peer_pid != static_cast<int32>(actual_pid)) { 223 if (peer_pid != static_cast<int32>(actual_pid)) {
224 LOG(ERROR) << "The actual client PID " << actual_pid 224 LOG(ERROR) << "The actual client PID " << actual_pid
225 << " does not match the one reported by the client: " 225 << " does not match the one reported by the client: "
226 << peer_pid; 226 << peer_pid;
227 StopWorker(); 227 StopWorker();
228 return; 228 return;
229 } 229 }
230 230
231 // Make sure |this| is not deleted if |worker_delegate_| decided to kill
232 // the WorkerProcessLauncher instance.
233 scoped_refptr<Core> self = this;
Sergey Ulanov 2012/10/24 20:12:01 How does that make any difference? This method ret
alexeypa (please no reviews) 2012/10/24 21:41:51 Yeah, this is probably not needed.
234
231 worker_delegate_->OnChannelConnected(peer_pid); 235 worker_delegate_->OnChannelConnected(peer_pid);
232 } 236 }
233 237
234 void WorkerProcessLauncher::Core::OnChannelError() { 238 void WorkerProcessLauncher::Core::OnChannelError() {
235 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 239 DCHECK(caller_task_runner_->BelongsToCurrentThread());
236 240
237 // Schedule a delayed termination of the worker process. Usually, the pipe is 241 // Schedule a delayed termination of the worker process. Usually, the pipe is
238 // disconnected when the worker process is about to exit. Waiting a little bit 242 // disconnected when the worker process is about to exit. Waiting a little bit
239 // here allows the worker to exit completely and so, notify 243 // here allows the worker to exit completely and so, notify
240 // |process_watcher_|. As the result KillProcess() will not be called and 244 // |process_watcher_|. As the result KillProcess() will not be called and
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 WorkerProcessLauncher::~WorkerProcessLauncher() { 344 WorkerProcessLauncher::~WorkerProcessLauncher() {
341 core_->Stop(); 345 core_->Stop();
342 core_ = NULL; 346 core_ = NULL;
343 } 347 }
344 348
345 void WorkerProcessLauncher::Send(IPC::Message* message) { 349 void WorkerProcessLauncher::Send(IPC::Message* message) {
346 core_->Send(message); 350 core_->Send(message);
347 } 351 }
348 352
349 } // namespace remoting 353 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698