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

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

Issue 10831271: [Chromoting] Adding uiAccess='true' to the remoting_me2me_host.exe's manifest as it is required to … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 8 years, 4 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
Index: remoting/host/win/wts_session_process_launcher.h
diff --git a/remoting/host/win/wts_session_process_launcher.h b/remoting/host/win/wts_session_process_launcher.h
index 3bde4c1c3fdf6c67e51eb08277a9d3ac97e71113..f492f1c10e45a218d1c97d3a17965e2c59564849 100644
--- a/remoting/host/win/wts_session_process_launcher.h
+++ b/remoting/host/win/wts_session_process_launcher.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop.h"
#include "base/process.h"
#include "base/time.h"
#include "base/timer.h"
@@ -35,7 +36,8 @@ class SasInjector;
class WtsConsoleMonitor;
class WtsSessionProcessLauncher
- : public Stoppable,
+ : public base::MessagePumpForIO::IOHandler,
+ public Stoppable,
public WorkerProcessLauncher::Delegate,
public WtsConsoleObserver {
public:
@@ -51,6 +53,11 @@ class WtsSessionProcessLauncher
virtual ~WtsSessionProcessLauncher();
+ // base::MessagePumpForIO::IOHandler implementation.
+ virtual void OnIOCompleted(base::MessagePumpForIO::IOContext* context,
+ DWORD bytes_transfered,
+ DWORD error) OVERRIDE;
+
// WorkerProcessLauncher::Delegate implementation.
virtual bool DoLaunchProcess(
const std::string& channel_name,
@@ -67,6 +74,20 @@ class WtsSessionProcessLauncher
// Stoppable implementation.
virtual void DoStop() OVERRIDE;
+ // Drains the completion port queue to make sure that all job object
+ // notifications has been received.
+ void DrainSandboxNotifications();
rvargas (doing something else) 2012/08/13 18:54:12 Avoid naming a job object a "sandbox". Everywhere.
alexeypa (please no reviews) 2012/08/13 20:02:23 Done.
+
+ // Notifies that the completion port queue has been drained.
+ void DrainSandboxNotificationsCompleted();
+
+ // Creates and initializes the job object that will sandbox the launched child
+ // processes.
+ void InitializeSandbox();
+
+ // Notifies that the sandbox initialization is complete.
+ void InitializeSandboxCompleted(scoped_ptr<base::win::ScopedHandle> job);
+
private:
// Attempts to launch the host process in the current console session.
// Schedules next launch attempt if creation of the process fails for any
@@ -103,6 +124,22 @@ class WtsSessionProcessLauncher
scoped_ptr<WorkerProcessLauncher> launcher_;
+ // The job object used to control the lifetime of child processes.
+ base::win::ScopedHandle job_;
+
+ // A waiting handle that becomes signalled once all process associated with
+ // the job have been terminated.
+ base::win::ScopedHandle process_exit_event_;
+
+ enum SandboxState {
+ kSandboxUninitialized,
+ kSandboxRunning,
+ kSandboxStopping,
+ kSandboxStopped
+ };
+
+ SandboxState sandbox_state_;
+
base::win::ScopedHandle worker_process_;
// The token to be used to launch a process in a different session.

Powered by Google App Engine
This is Rietveld 408576698