OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
6 #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 6 #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
7 | 7 |
8 | |
9 #include <map> | 8 #include <map> |
10 #include <set> | 9 #include <set> |
11 #include <string> | 10 #include <string> |
12 | 11 |
13 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
14 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
15 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
16 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
17 #include "content/public/browser/child_process_security_policy.h" | 16 #include "content/public/browser/child_process_security_policy.h" |
18 | 17 |
19 class FilePath; | 18 class FilePath; |
20 class GURL; | 19 class GURL; |
21 | 20 |
| 21 namespace content { |
| 22 |
22 class CONTENT_EXPORT ChildProcessSecurityPolicyImpl | 23 class CONTENT_EXPORT ChildProcessSecurityPolicyImpl |
23 : NON_EXPORTED_BASE(public content::ChildProcessSecurityPolicy) { | 24 : NON_EXPORTED_BASE(public ChildProcessSecurityPolicy) { |
24 public: | 25 public: |
25 // Object can only be created through GetInstance() so the constructor is | 26 // Object can only be created through GetInstance() so the constructor is |
26 // private. | 27 // private. |
27 virtual ~ChildProcessSecurityPolicyImpl(); | 28 virtual ~ChildProcessSecurityPolicyImpl(); |
28 | 29 |
29 static ChildProcessSecurityPolicyImpl* GetInstance(); | 30 static ChildProcessSecurityPolicyImpl* GetInstance(); |
30 | 31 |
31 // ChildProcessSecurityPolicy implementation. | 32 // ChildProcessSecurityPolicy implementation. |
32 virtual void RegisterWebSafeScheme(const std::string& scheme) OVERRIDE; | 33 virtual void RegisterWebSafeScheme(const std::string& scheme) OVERRIDE; |
33 virtual bool IsWebSafeScheme(const std::string& scheme) OVERRIDE; | 34 virtual bool IsWebSafeScheme(const std::string& scheme) OVERRIDE; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // not escape this class. | 201 // not escape this class. |
201 SecurityStateMap security_state_; | 202 SecurityStateMap security_state_; |
202 | 203 |
203 // This maps keeps the record of which js worker thread child process | 204 // This maps keeps the record of which js worker thread child process |
204 // corresponds to which main js thread child process. | 205 // corresponds to which main js thread child process. |
205 WorkerToMainProcessMap worker_map_; | 206 WorkerToMainProcessMap worker_map_; |
206 | 207 |
207 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 208 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
208 }; | 209 }; |
209 | 210 |
| 211 } // namespace content |
| 212 |
210 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 213 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
OLD | NEW |