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

Side by Side Diff: remoting/host/daemon_process.cc

Issue 11040065: [Chromoting] Reimplemented the worker process launcher to take into account the encountered issues: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Count the worker exiting too such as a failure. Created 8 years, 2 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 (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/daemon_process.h" 5 #include "remoting/host/daemon_process.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 25 matching lines...) Expand all
36 // Send the configuration to the network process. 36 // Send the configuration to the network process.
37 Send(new ChromotingDaemonNetworkMsg_Configuration(serialized_config_)); 37 Send(new ChromotingDaemonNetworkMsg_Configuration(serialized_config_));
38 } 38 }
39 39
40 bool DaemonProcess::OnMessageReceived(const IPC::Message& message) { 40 bool DaemonProcess::OnMessageReceived(const IPC::Message& message) {
41 DCHECK(main_task_runner()->BelongsToCurrentThread()); 41 DCHECK(main_task_runner()->BelongsToCurrentThread());
42 42
43 return false; 43 return false;
44 } 44 }
45 45
46 void DaemonProcess::OnPermanentError() {
47 DCHECK(main_task_runner()->BelongsToCurrentThread());
48
49 Stop();
50 }
51
46 DaemonProcess::DaemonProcess( 52 DaemonProcess::DaemonProcess(
47 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 53 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
48 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 54 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
49 const base::Closure& stopped_callback) 55 const base::Closure& stopped_callback)
50 : Stoppable(main_task_runner, stopped_callback), 56 : Stoppable(main_task_runner, stopped_callback),
51 main_task_runner_(main_task_runner), 57 main_task_runner_(main_task_runner),
52 io_task_runner_(io_task_runner) { 58 io_task_runner_(io_task_runner) {
53 // Initialize on the same thread that will be used for shutting down. 59 // Initialize on the same thread that will be used for shutting down.
54 main_task_runner_->PostTask( 60 main_task_runner_->PostTask(
55 FROM_HERE, 61 FROM_HERE,
(...skipping 22 matching lines...) Expand all
78 } 84 }
79 85
80 void DaemonProcess::DoStop() { 86 void DaemonProcess::DoStop() {
81 DCHECK(main_task_runner()->BelongsToCurrentThread()); 87 DCHECK(main_task_runner()->BelongsToCurrentThread());
82 88
83 config_watcher_.reset(); 89 config_watcher_.reset();
84 CompleteStopping(); 90 CompleteStopping();
85 } 91 }
86 92
87 } // namespace remoting 93 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698