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 | |
Avi (use Gerrit)
2016/05/06 02:34:04
ok?
ncarter (slow)
2016/05/06 16:16:40
Done.
luciferz.angel.73
2017/05/02 04:27:03
Done.
| |
8 #include <map> | 9 #include <map> |
9 #include <memory> | |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/debug/crash_logging.h" | |
15 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
16 #include "base/macros.h" | 15 #include "base/macros.h" |
17 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
18 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
19 #include "content/public/browser/child_process_security_policy.h" | 18 #include "content/public/browser/child_process_security_policy.h" |
20 #include "content/public/common/resource_type.h" | 19 #include "content/public/common/resource_type.h" |
21 #include "storage/common/fileapi/file_system_types.h" | 20 #include "storage/common/fileapi/file_system_types.h" |
22 | 21 |
23 class GURL; | 22 class GURL; |
24 | 23 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 bool CanReadWriteFileSystem(int child_id, | 71 bool CanReadWriteFileSystem(int child_id, |
73 const std::string& filesystem_id) override; | 72 const std::string& filesystem_id) override; |
74 bool CanCopyIntoFileSystem(int child_id, | 73 bool CanCopyIntoFileSystem(int child_id, |
75 const std::string& filesystem_id) override; | 74 const std::string& filesystem_id) override; |
76 bool CanDeleteFromFileSystem(int child_id, | 75 bool CanDeleteFromFileSystem(int child_id, |
77 const std::string& filesystem_id) override; | 76 const std::string& filesystem_id) override; |
78 bool HasWebUIBindings(int child_id) override; | 77 bool HasWebUIBindings(int child_id) override; |
79 void GrantSendMidiSysExMessage(int child_id) override; | 78 void GrantSendMidiSysExMessage(int child_id) override; |
80 bool CanAccessDataForOrigin(int child_id, const GURL& url) override; | 79 bool CanAccessDataForOrigin(int child_id, const GURL& url) override; |
81 | 80 |
82 // TODO(nick): Remove this once we understand http://crbug.com/600441 | |
83 std::unique_ptr<base::debug::ScopedCrashKey> GetOriginLockCrashKey( | |
84 int child_id); | |
85 | |
86 // Pseudo schemes are treated differently than other schemes because they | 81 // Pseudo schemes are treated differently than other schemes because they |
87 // cannot be requested like normal URLs. There is no mechanism for revoking | 82 // cannot be requested like normal URLs. There is no mechanism for revoking |
88 // pseudo schemes. | 83 // pseudo schemes. |
89 void RegisterPseudoScheme(const std::string& scheme); | 84 void RegisterPseudoScheme(const std::string& scheme); |
90 | 85 |
91 // Returns true iff |scheme| has been registered as pseudo scheme. | 86 // Returns true iff |scheme| has been registered as pseudo scheme. |
92 bool IsPseudoScheme(const std::string& scheme); | 87 bool IsPseudoScheme(const std::string& scheme); |
93 | 88 |
94 // Upon creation, child processes should register themselves by calling this | 89 // Upon creation, child processes should register themselves by calling this |
95 // this method exactly once. | 90 // this method exactly once. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 WorkerToMainProcessMap worker_map_; | 247 WorkerToMainProcessMap worker_map_; |
253 | 248 |
254 FileSystemPermissionPolicyMap file_system_policy_map_; | 249 FileSystemPermissionPolicyMap file_system_policy_map_; |
255 | 250 |
256 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 251 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
257 }; | 252 }; |
258 | 253 |
259 } // namespace content | 254 } // namespace content |
260 | 255 |
261 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 256 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
OLD | NEW |