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 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const base::FilePath& file) OVERRIDE; | 47 const base::FilePath& file) OVERRIDE; |
48 virtual void GrantReadFileSystem( | 48 virtual void GrantReadFileSystem( |
49 int child_id, | 49 int child_id, |
50 const std::string& filesystem_id) OVERRIDE; | 50 const std::string& filesystem_id) OVERRIDE; |
51 virtual void GrantWriteFileSystem( | 51 virtual void GrantWriteFileSystem( |
52 int child_id, | 52 int child_id, |
53 const std::string& filesystem_id) OVERRIDE; | 53 const std::string& filesystem_id) OVERRIDE; |
54 virtual void GrantCreateFileForFileSystem( | 54 virtual void GrantCreateFileForFileSystem( |
55 int child_id, | 55 int child_id, |
56 const std::string& filesystem_id) OVERRIDE; | 56 const std::string& filesystem_id) OVERRIDE; |
| 57 virtual void GrantCreateReadWriteFileSystem( |
| 58 int child_id, |
| 59 const std::string& filesystem_id) OVERRIDE; |
57 virtual void GrantCopyIntoFileSystem( | 60 virtual void GrantCopyIntoFileSystem( |
58 int child_id, | 61 int child_id, |
59 const std::string& filesystem_id) OVERRIDE; | 62 const std::string& filesystem_id) OVERRIDE; |
60 virtual void GrantDeleteFromFileSystem( | 63 virtual void GrantDeleteFromFileSystem( |
61 int child_id, | 64 int child_id, |
62 const std::string& filesystem_id) OVERRIDE; | 65 const std::string& filesystem_id) OVERRIDE; |
63 virtual void GrantScheme(int child_id, const std::string& scheme) OVERRIDE; | 66 virtual void GrantScheme(int child_id, const std::string& scheme) OVERRIDE; |
64 virtual bool CanReadFile(int child_id, const base::FilePath& file) OVERRIDE; | 67 virtual bool CanReadFile(int child_id, const base::FilePath& file) OVERRIDE; |
65 virtual bool CanCreateReadWriteFile(int child_id, | 68 virtual bool CanCreateReadWriteFile(int child_id, |
66 const base::FilePath& file) OVERRIDE; | 69 const base::FilePath& file) OVERRIDE; |
67 virtual bool CanReadFileSystem(int child_id, | 70 virtual bool CanReadFileSystem(int child_id, |
68 const std::string& filesystem_id) OVERRIDE; | 71 const std::string& filesystem_id) OVERRIDE; |
69 virtual bool CanReadWriteFileSystem( | 72 virtual bool CanReadWriteFileSystem( |
70 int child_id, | 73 int child_id, |
71 const std::string& filesystem_id) OVERRIDE; | 74 const std::string& filesystem_id) OVERRIDE; |
72 virtual bool CanCopyIntoFileSystem(int child_id, | 75 virtual bool CanCopyIntoFileSystem(int child_id, |
73 const std::string& filesystem_id) OVERRIDE; | 76 const std::string& filesystem_id) OVERRIDE; |
74 virtual bool CanDeleteFromFileSystem( | 77 virtual bool CanDeleteFromFileSystem( |
75 int child_id, | 78 int child_id, |
76 const std::string& filesystem_id) OVERRIDE; | 79 const std::string& filesystem_id) OVERRIDE; |
77 | 80 |
78 void GrantCreateReadWriteFileSystem( | |
79 int child_id, | |
80 const std::string& filesystem_id); | |
81 | |
82 // Pseudo schemes are treated differently than other schemes because they | 81 // Pseudo schemes are treated differently than other schemes because they |
83 // 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 |
84 // pseudo schemes. | 83 // pseudo schemes. |
85 void RegisterPseudoScheme(const std::string& scheme); | 84 void RegisterPseudoScheme(const std::string& scheme); |
86 | 85 |
87 // Returns true iff |scheme| has been registered as pseudo scheme. | 86 // Returns true iff |scheme| has been registered as pseudo scheme. |
88 bool IsPseudoScheme(const std::string& scheme); | 87 bool IsPseudoScheme(const std::string& scheme); |
89 | 88 |
90 // Upon creation, child processes should register themselves by calling this | 89 // Upon creation, child processes should register themselves by calling this |
91 // this method exactly once. | 90 // this method exactly once. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 WorkerToMainProcessMap worker_map_; | 272 WorkerToMainProcessMap worker_map_; |
274 | 273 |
275 FileSystemPermissionPolicyMap file_system_policy_map_; | 274 FileSystemPermissionPolicyMap file_system_policy_map_; |
276 | 275 |
277 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 276 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
278 }; | 277 }; |
279 | 278 |
280 } // namespace content | 279 } // namespace content |
281 | 280 |
282 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 281 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
OLD | NEW |