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

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

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory Created 11 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 unified diff | Download patch
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/sandbox_init_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_ 5 #ifndef CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
6 #define CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_ 6 #define CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
7 7
8 // Wraps the sandbox initialization and platform variables to consolodate 8 // Wraps the sandbox initialization and platform variables to consolodate
9 // the code and reduce the number of platform ifdefs elsewhere. The POSIX 9 // the code and reduce the number of platform ifdefs elsewhere. The POSIX
10 // version of this wrapper is basically empty. 10 // version of this wrapper is basically empty.
(...skipping 16 matching lines...) Expand all
27 SandboxInitWrapper() : broker_services_(), target_services_() { } 27 SandboxInitWrapper() : broker_services_(), target_services_() { }
28 // SetServices() needs to be called before InitializeSandbox() on Win32 with 28 // SetServices() needs to be called before InitializeSandbox() on Win32 with
29 // the info received from the chrome exe main. 29 // the info received from the chrome exe main.
30 void SetServices(sandbox::SandboxInterfaceInfo* sandbox_info); 30 void SetServices(sandbox::SandboxInterfaceInfo* sandbox_info);
31 sandbox::BrokerServices* BrokerServices() const { return broker_services_; } 31 sandbox::BrokerServices* BrokerServices() const { return broker_services_; }
32 sandbox::TargetServices* TargetServices() const { return target_services_; } 32 sandbox::TargetServices* TargetServices() const { return target_services_; }
33 33
34 // Initialize the sandbox for renderer and plug-in processes, depending on 34 // Initialize the sandbox for renderer and plug-in processes, depending on
35 // the command line flags. The browser process is not sandboxed. 35 // the command line flags. The browser process is not sandboxed.
36 void InitializeSandbox(const CommandLine& parsed_command_line, 36 void InitializeSandbox(const CommandLine& parsed_command_line,
37 const std::wstring& process_type); 37 const std::string& process_type);
38 private: 38 private:
39 sandbox::BrokerServices* broker_services_; 39 sandbox::BrokerServices* broker_services_;
40 sandbox::TargetServices* target_services_; 40 sandbox::TargetServices* target_services_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper); 42 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper);
43 }; 43 };
44 44
45 #elif defined(OS_POSIX) 45 #elif defined(OS_POSIX)
46 46
47 class SandboxInitWrapper { 47 class SandboxInitWrapper {
48 public: 48 public:
49 SandboxInitWrapper() { } 49 SandboxInitWrapper() { }
50 50
51 // Initialize the sandbox for renderer and plug-in processes, depending on 51 // Initialize the sandbox for renderer and plug-in processes, depending on
52 // the command line flags. The browser process is not sandboxed. 52 // the command line flags. The browser process is not sandboxed.
53 void InitializeSandbox(const CommandLine& parsed_command_line, 53 void InitializeSandbox(const CommandLine& parsed_command_line,
54 const std::wstring& process_type); 54 const std::string& process_type);
55 55
56 #if defined(OS_MACOSX) 56 #if defined(OS_MACOSX)
57 // We keep the process type so we can configure the sandbox as needed. 57 // We keep the process type so we can configure the sandbox as needed.
58 public: 58 public:
59 std::wstring ProcessType() const { return process_type_; } 59 std::string ProcessType() const { return process_type_; }
60 private: 60 private:
61 std::wstring process_type_; 61 std::string process_type_;
62 #endif 62 #endif
63 63
64 private: 64 private:
65 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper); 65 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper);
66 }; 66 };
67 67
68 #endif 68 #endif
69 69
70 #endif // CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_ 70 #endif // CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/sandbox_init_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698