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

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

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: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/win/unprivileged_process_delegate.h
diff --git a/remoting/host/win/unprivileged_process_delegate.h b/remoting/host/win/unprivileged_process_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed69e1c2deb5110691f496a129417cef305cd17d
--- /dev/null
+++ b/remoting/host/win/unprivileged_process_delegate.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_WIN_UNPRIVILEDGED_PROCESS_DELEGATE_H_
simonmorris 2012/10/05 20:19:45 s/EDGE/EGE/
alexeypa (please no reviews) 2012/10/05 21:18:34 Done.
+#define REMOTING_HOST_WIN_UNPRIVILEDGED_PROCESS_DELEGATE_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/file_path.h"
+#include "base/memory/ref_counted.h"
+#include "remoting/host/win/worker_process_launcher.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace remoting {
+
+// Implements logic for launching and monitoring a worker process under a less
+// privileged user account.
+class UnprivilegedProcessDelegate : public WorkerProcessLauncher::Delegate {
+ public:
+ UnprivilegedProcessDelegate(
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+ const FilePath& binary_path);
+ ~UnprivilegedProcessDelegate();
+
+ // WorkerProcessLauncher::Delegate implementation.
+ virtual DWORD GetExitCode() OVERRIDE;
+ virtual void KillProcess(DWORD exit_code) OVERRIDE;
+ virtual bool LaunchProcess(
+ const std::string& channel_name,
+ base::win::ScopedHandle* process_exit_event_out) OVERRIDE;
+
+ private:
+ // The task runner all public methods of this class should be called on.
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
+
+ // The task runner serving job object notifications.
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
+
+ // Path to the worker process binary.
+ FilePath binary_path_;
+
+ // The handle of the worker process, if launched.
+ base::win::ScopedHandle worker_process_;
+
+ DISALLOW_COPY_AND_ASSIGN(UnprivilegedProcessDelegate);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_WIN_UNPRIVILEDGED_PROCESS_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698