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

Side by Side Diff: content/browser/bootstrap_sandbox_manager_mac.cc

Issue 1379133003: Revert of Enable the bootstrap sandbox by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/public/common/content_switches.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/bootstrap_sandbox_manager_mac.h" 5 #include "content/browser/bootstrap_sandbox_manager_mac.h"
6 6
7 #include "base/command_line.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
10 #include "content/browser/browser_io_surface_manager_mac.h" 9 #include "content/browser/browser_io_surface_manager_mac.h"
11 #include "content/browser/mach_broker_mac.h" 10 #include "content/browser/mach_broker_mac.h"
12 #include "content/common/sandbox_init_mac.h" 11 #include "content/common/sandbox_init_mac.h"
13 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
14 #include "content/public/browser/child_process_data.h" 13 #include "content/public/browser/child_process_data.h"
15 #include "content/public/browser/render_process_host.h" 14 #include "content/public/browser/render_process_host.h"
16 #include "content/public/common/content_switches.h"
17 #include "sandbox/mac/bootstrap_sandbox.h" 15 #include "sandbox/mac/bootstrap_sandbox.h"
18 16
19 namespace content { 17 namespace content {
20 18
21 // static 19 // static
22 bool BootstrapSandboxManager::ShouldEnable() { 20 bool BootstrapSandboxManager::ShouldEnable() {
23 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 21 return false;
24 switches::kDisableBootstrapSandbox);
25 } 22 }
26 23
27 // static 24 // static
28 BootstrapSandboxManager* BootstrapSandboxManager::GetInstance() { 25 BootstrapSandboxManager* BootstrapSandboxManager::GetInstance() {
29 return base::Singleton<BootstrapSandboxManager>::get(); 26 return base::Singleton<BootstrapSandboxManager>::get();
30 } 27 }
31 28
32 bool BootstrapSandboxManager::EnabledForSandbox(SandboxType sandbox_type) { 29 bool BootstrapSandboxManager::EnabledForSandbox(SandboxType sandbox_type) {
33 return sandbox_type == SANDBOX_TYPE_RENDERER; 30 return sandbox_type == SANDBOX_TYPE_RENDERER;
34 } 31 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 auto& rules = policy->rules; 99 auto& rules = policy->rules;
103 100
104 // Allow the child to send its task port to the MachBroker. 101 // Allow the child to send its task port to the MachBroker.
105 rules[MachBroker::GetMachPortName()] = sandbox::Rule(sandbox::POLICY_ALLOW); 102 rules[MachBroker::GetMachPortName()] = sandbox::Rule(sandbox::POLICY_ALLOW);
106 103
107 // Allow logging to the syslog. 104 // Allow logging to the syslog.
108 rules["com.apple.system.logger"] = sandbox::Rule(sandbox::POLICY_ALLOW); 105 rules["com.apple.system.logger"] = sandbox::Rule(sandbox::POLICY_ALLOW);
109 } 106 }
110 107
111 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698