OLD | NEW |
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_mac.h" | 5 #include "content/browser/bootstrap_sandbox_mac.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class BootstrapSandboxPolicy : public BrowserChildProcessObserver { | 23 class BootstrapSandboxPolicy : public BrowserChildProcessObserver { |
24 public: | 24 public: |
25 static BootstrapSandboxPolicy* GetInstance(); | 25 static BootstrapSandboxPolicy* GetInstance(); |
26 | 26 |
27 sandbox::BootstrapSandbox* sandbox() const { | 27 sandbox::BootstrapSandbox* sandbox() const { |
28 return sandbox_.get(); | 28 return sandbox_.get(); |
29 } | 29 } |
30 | 30 |
31 // BrowserChildProcessObserver: | 31 // BrowserChildProcessObserver: |
32 virtual void BrowserChildProcessHostDisconnected( | 32 virtual void BrowserChildProcessHostDisconnected( |
33 const ChildProcessData& data) OVERRIDE; | 33 const ChildProcessData& data) override; |
34 virtual void BrowserChildProcessCrashed( | 34 virtual void BrowserChildProcessCrashed( |
35 const ChildProcessData& data) OVERRIDE; | 35 const ChildProcessData& data) override; |
36 | 36 |
37 private: | 37 private: |
38 friend struct DefaultSingletonTraits<BootstrapSandboxPolicy>; | 38 friend struct DefaultSingletonTraits<BootstrapSandboxPolicy>; |
39 BootstrapSandboxPolicy(); | 39 BootstrapSandboxPolicy(); |
40 virtual ~BootstrapSandboxPolicy(); | 40 virtual ~BootstrapSandboxPolicy(); |
41 | 41 |
42 void RegisterSandboxPolicies(); | 42 void RegisterSandboxPolicies(); |
43 | 43 |
44 scoped_ptr<sandbox::BootstrapSandbox> sandbox_; | 44 scoped_ptr<sandbox::BootstrapSandbox> sandbox_; |
45 }; | 45 }; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 bool ShouldEnableBootstrapSandbox() { | 77 bool ShouldEnableBootstrapSandbox() { |
78 return base::mac::IsOSMountainLionOrEarlier() || | 78 return base::mac::IsOSMountainLionOrEarlier() || |
79 base::mac::IsOSMavericks(); | 79 base::mac::IsOSMavericks(); |
80 } | 80 } |
81 | 81 |
82 sandbox::BootstrapSandbox* GetBootstrapSandbox() { | 82 sandbox::BootstrapSandbox* GetBootstrapSandbox() { |
83 return BootstrapSandboxPolicy::GetInstance()->sandbox(); | 83 return BootstrapSandboxPolicy::GetInstance()->sandbox(); |
84 } | 84 } |
85 | 85 |
86 } // namespace content | 86 } // namespace content |
OLD | NEW |