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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // Before servicing a child process's request for a URL, the browser should | 133 // Before servicing a child process's request for a URL, the browser should |
134 // call this method to determine whether the process has the capability to | 134 // call this method to determine whether the process has the capability to |
135 // request the URL. | 135 // request the URL. |
136 bool CanRequestURL(int child_id, const GURL& url); | 136 bool CanRequestURL(int child_id, const GURL& url); |
137 | 137 |
138 // Returns true if the process is permitted to load pages from | 138 // Returns true if the process is permitted to load pages from |
139 // the given origin in main frames or subframes. | 139 // the given origin in main frames or subframes. |
140 // Only might return false if --site-per-process flag is used. | 140 // Only might return false if --site-per-process flag is used. |
141 bool CanLoadPage(int child_id, | 141 bool CanLoadPage(int child_id, |
142 const GURL& url, | 142 const GURL& url, |
143 ResourceType::Type resource_type); | 143 ResourceType resource_type); |
144 | 144 |
145 // Explicit permissions checks for FileSystemURL specified files. | 145 // Explicit permissions checks for FileSystemURL specified files. |
146 bool CanReadFileSystemFile(int child_id, const fileapi::FileSystemURL& url); | 146 bool CanReadFileSystemFile(int child_id, const fileapi::FileSystemURL& url); |
147 bool CanWriteFileSystemFile(int child_id, const fileapi::FileSystemURL& url); | 147 bool CanWriteFileSystemFile(int child_id, const fileapi::FileSystemURL& url); |
148 bool CanCreateFileSystemFile(int child_id, const fileapi::FileSystemURL& url); | 148 bool CanCreateFileSystemFile(int child_id, const fileapi::FileSystemURL& url); |
149 bool CanCreateReadWriteFileSystemFile(int child_id, | 149 bool CanCreateReadWriteFileSystemFile(int child_id, |
150 const fileapi::FileSystemURL& url); | 150 const fileapi::FileSystemURL& url); |
151 bool CanCopyIntoFileSystemFile(int child_id, | 151 bool CanCopyIntoFileSystemFile(int child_id, |
152 const fileapi::FileSystemURL& url); | 152 const fileapi::FileSystemURL& url); |
153 bool CanDeleteFileSystemFile(int child_id, | 153 bool CanDeleteFileSystemFile(int child_id, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 WorkerToMainProcessMap worker_map_; | 271 WorkerToMainProcessMap worker_map_; |
272 | 272 |
273 FileSystemPermissionPolicyMap file_system_policy_map_; | 273 FileSystemPermissionPolicyMap file_system_policy_map_; |
274 | 274 |
275 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 275 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
276 }; | 276 }; |
277 | 277 |
278 } // namespace content | 278 } // namespace content |
279 | 279 |
280 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 280 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
OLD | NEW |