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

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

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
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 #include "chrome/common/sandbox_init_wrapper.h" 5 #include "chrome/common/sandbox_init_wrapper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 11
12 void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) { 12 void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) {
13 if (info) { 13 if (info) {
14 broker_services_ = info->broker_services; 14 broker_services_ = info->broker_services;
15 target_services_ = info->target_services; 15 target_services_ = info->target_services;
16 } 16 }
17 } 17 }
18 18
19 #endif 19 #endif
20 20
21 void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, 21 void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
22 const std::wstring& process_type) { 22 const std::string& process_type) {
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 if (!target_services_) 24 if (!target_services_)
25 return; 25 return;
26 #endif 26 #endif
27 if (!command_line.HasSwitch(switches::kNoSandbox)) { 27 if (!command_line.HasSwitch(switches::kNoSandbox)) {
28 if ((process_type == switches::kRendererProcess) || 28 if ((process_type == switches::kRendererProcess) ||
29 (process_type == switches::kWorkerProcess) || 29 (process_type == switches::kWorkerProcess) ||
30 (process_type == switches::kNaClProcess) || 30 (process_type == switches::kNaClProcess) ||
31 (process_type == switches::kUtilityProcess) || 31 (process_type == switches::kUtilityProcess) ||
32 (process_type == switches::kPluginProcess && 32 (process_type == switches::kPluginProcess &&
33 command_line.HasSwitch(switches::kSafePlugins))) { 33 command_line.HasSwitch(switches::kSafePlugins))) {
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 target_services_->Init(); 35 target_services_->Init();
36 #elif defined(OS_MACOSX) 36 #elif defined(OS_MACOSX)
37 // We just cache the process type so we can configure the sandbox 37 // We just cache the process type so we can configure the sandbox
38 // correctly, see renderer_main_platform_delegate_mac.cc for one of those 38 // correctly, see renderer_main_platform_delegate_mac.cc for one of those
39 // places. 39 // places.
40 process_type_ = process_type; 40 process_type_ = process_type;
41 #endif 41 #endif
42 } 42 }
43 } 43 }
44 } 44 }
OLDNEW
« no previous file with comments | « chrome/common/sandbox_init_wrapper.h ('k') | chrome/installer/util/google_chrome_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698