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

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

Issue 10828160: [Chromoting] Move CreateSessionToken() next to launch process utilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ 5 #ifndef REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_
6 #define REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ 6 #define REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <string> 9 #include <string>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "base/win/scoped_handle.h"
Wez 2012/08/03 20:56:06 nit: Forward-declare since you don't actually need
alexeypa (please no reviews) 2012/08/03 21:40:39 ScopedHandle is a template specialization which ca
Wez 2012/08/06 17:41:04 Personally I'd leave the API using ScopedHandle, a
alexeypa (please no reviews) 2012/08/06 17:48:36 Getting rid of include wasn't the reason to switch
Wez 2012/08/06 17:57:30 Right; Pass() is syntactic sugar for Set(Take());
13 14
14 namespace remoting { 15 namespace remoting {
15 16
17 // Creates a copy of the current process token for the given |session_id| so
18 // it can be used to launch a process in that session.
19 bool CreateSessionToken(uint32 session_id, base::win::ScopedHandle* token_out);
20
16 // Launches |binary| in the security context of the user represented by 21 // Launches |binary| in the security context of the user represented by
17 // |user_token|. The session ID specified by the token is respected as well. 22 // |user_token|. The session ID specified by the token is respected as well.
18 bool LaunchProcessWithToken(const FilePath& binary, 23 bool LaunchProcessWithToken(const FilePath& binary,
19 const std::wstring& command_line, 24 const std::wstring& command_line,
20 HANDLE user_token, 25 HANDLE user_token,
21 base::Process* process_out); 26 base::Process* process_out);
22 27
23 } // namespace remoting 28 } // namespace remoting
24 29
25 #endif // REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ 30 #endif // REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698