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