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

Side by Side Diff: chrome/common/sandbox_init_wrapper.h

Issue 17426: remove chrome dependencies from win sandboxing headers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
6 #define CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
7
8 // Wraps the sandbox initialization and platform variables to consolodate
9 // the code and reduce the number of platform ifdefs elsewhere. The POSIX
10 // version of this wrapper is basically empty.
11
12 #include "build/build_config.h"
13
14 #include <string>
15 #if defined(OS_WIN)
16 #include "sandbox/src/sandbox.h"
17 #endif
18
19 class CommandLine;
20
21 #if defined(OS_WIN)
22
23 class SandboxInitWrapper {
24 public:
25 SandboxInitWrapper() : broker_services_(), target_services_() { }
26 // SetServices() needs to be called before InitializeSandbox() on Win32 with
27 // the info received from the chrome exe main.
28 void SetServices(sandbox::SandboxInterfaceInfo* sandbox_info);
29 sandbox::BrokerServices* BrokerServices() const { return broker_services_; }
30 sandbox::TargetServices* TargetServices() const { return target_services_; }
31
32 // Initialize the sandbox for renderer and plug-in processes, depending on
33 // the command line flags. The browser process is not sandboxed.
34 void InitializeSandbox(const CommandLine& parsed_command_line,
35 const std::wstring& process_type);
36 private:
37 sandbox::BrokerServices* broker_services_;
38 sandbox::TargetServices* target_services_;
39 };
brettw 2009/01/09 18:10:47 Maybe DISALLOW_COPY_AND_ASSIGN here? (And below.)
40
41 #elif defined(OS_POSIX)
42
43 class SandboxInitWrapper {
44 public:
45 SandboxInitWrapper() { }
46
47 // Initialize the sandbox for renderer and plug-in processes, depending on
48 // the command line flags. The browser process is not sandboxed.
49 void InitializeSandbox(const CommandLine& parsed_command_line,
50 const std::wstring& process_type);
51 };
52
53 #endif
54
55 #endif // CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698