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

Side by Side Diff: remoting/host/win/worker_process_launcher.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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
« no previous file with comments | « remoting/host/signaling_connector.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_WIN_WORKER_PROCESS_LAUNCHER_H_ 5 #ifndef REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_
6 #define REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ 6 #define REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 // Keeps the exit code of the worker process after it was closed. The exit 133 // Keeps the exit code of the worker process after it was closed. The exit
134 // code is used to determine whether the process has to be restarted. 134 // code is used to determine whether the process has to be restarted.
135 DWORD exit_code_; 135 DWORD exit_code_;
136 136
137 // True if IPC messages should be passed to |ipc_handler_|. 137 // True if IPC messages should be passed to |ipc_handler_|.
138 bool ipc_enabled_; 138 bool ipc_enabled_;
139 139
140 // The timer used to delay termination of the worker process when an IPC error 140 // The timer used to delay termination of the worker process when an IPC error
141 // occured or when Crash() request is pending 141 // occured or when Crash() request is pending
142 base::OneShotTimer<WorkerProcessLauncher> kill_process_timer_; 142 base::OneShotTimer kill_process_timer_;
143 143
144 // The default timeout for |kill_process_timer_|. 144 // The default timeout for |kill_process_timer_|.
145 base::TimeDelta kill_process_timeout_; 145 base::TimeDelta kill_process_timeout_;
146 146
147 // State used to backoff worker launch attempts on failure. 147 // State used to backoff worker launch attempts on failure.
148 net::BackoffEntry launch_backoff_; 148 net::BackoffEntry launch_backoff_;
149 149
150 // Timer used to schedule the next attempt to launch the process. 150 // Timer used to schedule the next attempt to launch the process.
151 base::OneShotTimer<WorkerProcessLauncher> launch_timer_; 151 base::OneShotTimer launch_timer_;
152 152
153 // Monitors |worker_process_| to detect when the launched process 153 // Monitors |worker_process_| to detect when the launched process
154 // terminates. 154 // terminates.
155 base::win::ObjectWatcher process_watcher_; 155 base::win::ObjectWatcher process_watcher_;
156 156
157 // Timer used to detect whether a launch attempt was successful or not, and to 157 // Timer used to detect whether a launch attempt was successful or not, and to
158 // cancel the launch attempt if it is taking too long. 158 // cancel the launch attempt if it is taking too long.
159 base::OneShotTimer<WorkerProcessLauncher> launch_result_timer_; 159 base::OneShotTimer launch_result_timer_;
160 160
161 // The handle of the worker process, if launched. 161 // The handle of the worker process, if launched.
162 base::win::ScopedHandle worker_process_; 162 base::win::ScopedHandle worker_process_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(WorkerProcessLauncher); 164 DISALLOW_COPY_AND_ASSIGN(WorkerProcessLauncher);
165 }; 165 };
166 166
167 } // namespace remoting 167 } // namespace remoting
168 168
169 #endif // REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_ 169 #endif // REMOTING_HOST_WIN_WORKER_PROCESS_LAUNCHER_H_
OLDNEW
« no previous file with comments | « remoting/host/signaling_connector.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698