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

Unified Diff: remoting/host/win/worker_process_launcher.h

Issue 12545006: The worker process launcher can now ask the worker to crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/win/unprivileged_process_delegate.cc ('k') | remoting/host/win/worker_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/worker_process_launcher.h
diff --git a/remoting/host/win/worker_process_launcher.h b/remoting/host/win/worker_process_launcher.h
index 1eea8cd0775d844daea07da9ba2b0c60cfd2be28..4f3711f6e8c6d6f23abb09590e607292a9ac03cf 100644
--- a/remoting/host/win/worker_process_launcher.h
+++ b/remoting/host/win/worker_process_launcher.h
@@ -14,6 +14,7 @@
namespace base {
class SingleThreadTaskRunner;
+class TimeDelta;
} // namespace base
namespace IPC {
@@ -21,6 +22,10 @@ class Listener;
class Message;
} // namespace IPC
+namespace tracked_objects {
+class Location;
+} // namespace tracked_objects
+
namespace remoting {
class WorkerProcessIpcDelegate;
@@ -35,6 +40,9 @@ class WorkerProcessLauncher {
public:
virtual ~Delegate();
+ // Closes the IPC channel.
+ virtual void CloseChannel() = 0;
+
// Returns PID of the worker process or 0 if it is not available.
virtual DWORD GetProcessId() const = 0;
@@ -68,12 +76,24 @@ class WorkerProcessLauncher {
WorkerProcessIpcDelegate* worker_delegate);
~WorkerProcessLauncher();
+ // Asks the worker process to crash and generate a dump, and closes the IPC
+ // channel. |location| is passed to the worker so that it is on the stack in
+ // the dump. Restarts the worker process forcefully, if it does
+ // not exit on its own.
+ void Crash(const tracked_objects::Location& location);
+
// Sends an IPC message to the worker process. The message will be silently
// dropped if Send() is called before Start() or after stutdown has been
// initiated.
void Send(IPC::Message* message);
private:
+ friend class WorkerProcessLauncherTest;
+
+ // Hooks that allow test code to call the corresponding methods of |Core|.
+ void ResetLaunchSuccessTimeoutForTest();
+ void SetKillProcessTimeoutForTest(const base::TimeDelta& timeout);
+
// The actual implementation resides in WorkerProcessLauncher::Core class.
class Core;
scoped_refptr<Core> core_;
« no previous file with comments | « remoting/host/win/unprivileged_process_delegate.cc ('k') | remoting/host/win/worker_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698