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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void GrantReadRawCookies(int child_id); | 119 void GrantReadRawCookies(int child_id); |
120 | 120 |
121 // Revoke read raw cookies permission. | 121 // Revoke read raw cookies permission. |
122 void RevokeReadRawCookies(int child_id); | 122 void RevokeReadRawCookies(int child_id); |
123 | 123 |
124 // Before servicing a child process's request for a URL, the browser should | 124 // Before servicing a child process's request for a URL, the browser should |
125 // call this method to determine whether the process has the capability to | 125 // call this method to determine whether the process has the capability to |
126 // request the URL. | 126 // request the URL. |
127 bool CanRequestURL(int child_id, const GURL& url); | 127 bool CanRequestURL(int child_id, const GURL& url); |
128 | 128 |
129 // Returns true if the process is permitted to load pages from | |
130 // the given origin in main frames or subframes. | |
131 // Only might return false if --site-per-process flag is used. | |
132 bool CanLoadPage(int child_id, | |
133 const GURL& url, | |
134 ResourceType resource_type); | |
135 | |
136 // Explicit permissions checks for FileSystemURL specified files. | 129 // Explicit permissions checks for FileSystemURL specified files. |
137 bool CanReadFileSystemFile(int child_id, const storage::FileSystemURL& url); | 130 bool CanReadFileSystemFile(int child_id, const storage::FileSystemURL& url); |
138 bool CanWriteFileSystemFile(int child_id, const storage::FileSystemURL& url); | 131 bool CanWriteFileSystemFile(int child_id, const storage::FileSystemURL& url); |
139 bool CanCreateFileSystemFile(int child_id, const storage::FileSystemURL& url); | 132 bool CanCreateFileSystemFile(int child_id, const storage::FileSystemURL& url); |
140 bool CanCreateReadWriteFileSystemFile(int child_id, | 133 bool CanCreateReadWriteFileSystemFile(int child_id, |
141 const storage::FileSystemURL& url); | 134 const storage::FileSystemURL& url); |
142 bool CanCopyIntoFileSystemFile(int child_id, | 135 bool CanCopyIntoFileSystemFile(int child_id, |
143 const storage::FileSystemURL& url); | 136 const storage::FileSystemURL& url); |
144 bool CanDeleteFileSystemFile(int child_id, const storage::FileSystemURL& url); | 137 bool CanDeleteFileSystemFile(int child_id, const storage::FileSystemURL& url); |
145 | 138 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 WorkerToMainProcessMap worker_map_; | 239 WorkerToMainProcessMap worker_map_; |
247 | 240 |
248 FileSystemPermissionPolicyMap file_system_policy_map_; | 241 FileSystemPermissionPolicyMap file_system_policy_map_; |
249 | 242 |
250 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 243 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
251 }; | 244 }; |
252 | 245 |
253 } // namespace content | 246 } // namespace content |
254 | 247 |
255 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 248 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
OLD | NEW |