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

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

Issue 11234034: Crash the network process when a fatal daemon-to-network protocol error encountered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef REMOTING_HOST_DAEMON_PROCESS_H_ 5 #ifndef REMOTING_HOST_DAEMON_PROCESS_H_
6 #define REMOTING_HOST_DAEMON_PROCESS_H_ 6 #define REMOTING_HOST_DAEMON_PROCESS_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/location.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "ipc/ipc_channel.h" 15 #include "ipc/ipc_channel.h"
15 #include "ipc/ipc_channel_proxy.h" 16 #include "ipc/ipc_channel_proxy.h"
16 #include "remoting/base/stoppable.h" 17 #include "remoting/base/stoppable.h"
17 #include "remoting/host/config_file_watcher.h" 18 #include "remoting/host/config_file_watcher.h"
18 #include "remoting/host/worker_process_ipc_delegate.h" 19 #include "remoting/host/worker_process_ipc_delegate.h"
19 20
20 class FilePath; 21 class FilePath;
21 22
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Reads the host configuration and launches the network process. 73 // Reads the host configuration and launches the network process.
73 void Initialize(); 74 void Initialize();
74 75
75 // Creates a desktop session and assigns a unique ID to it. 76 // Creates a desktop session and assigns a unique ID to it.
76 void CreateDesktopSession(int terminal_id); 77 void CreateDesktopSession(int terminal_id);
77 78
78 // Returns true if |terminal_id| is considered to be known. I.e. it is 79 // Returns true if |terminal_id| is considered to be known. I.e. it is
79 // less or equal to the highest ID we have seen so far. 80 // less or equal to the highest ID we have seen so far.
80 bool IsTerminalIdKnown(int terminal_id); 81 bool IsTerminalIdKnown(int terminal_id);
81 82
83 // Restarts the network process.
84 void RestartNetworkProcess(const tracked_objects::Location& location);
85
82 // Stoppable implementation. 86 // Stoppable implementation.
83 virtual void DoStop() OVERRIDE; 87 virtual void DoStop() OVERRIDE;
84 88
85 // Creates a platform-specific desktop session and assigns a unique ID to it. 89 // Creates a platform-specific desktop session and assigns a unique ID to it.
86 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession( 90 virtual scoped_ptr<DesktopSession> DoCreateDesktopSession(
87 int terminal_id) = 0; 91 int terminal_id) = 0;
88 92
89 // Launches the network process and establishes an IPC channel with it. 93 // Launches the network process and establishes an IPC channel with it.
90 virtual void LaunchNetworkProcess() = 0; 94 virtual void LaunchNetworkProcess() = 0;
91 95
92 // Restart the network process.
93 virtual void RestartNetworkProcess() = 0;
94
95 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() { 96 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() {
96 return caller_task_runner_; 97 return caller_task_runner_;
97 } 98 }
98 99
99 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() { 100 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() {
100 return io_task_runner_; 101 return io_task_runner_;
101 } 102 }
102 103
103 // Let the test code analyze the list of desktop sessions. 104 // Let the test code analyze the list of desktop sessions.
104 friend class DaemonProcessTest; 105 friend class DaemonProcessTest;
(...skipping 21 matching lines...) Expand all
126 127
127 // The highest desktop session ID that has been seen so far. 128 // The highest desktop session ID that has been seen so far.
128 int next_terminal_id_; 129 int next_terminal_id_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(DaemonProcess); 131 DISALLOW_COPY_AND_ASSIGN(DaemonProcess);
131 }; 132 };
132 133
133 } // namespace remoting 134 } // namespace remoting
134 135
135 #endif // REMOTING_HOST_DAEMON_PROCESS_H_ 136 #endif // REMOTING_HOST_DAEMON_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698