Chromium Code Reviews| 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 // Whether the process is allowed to commit a page from the given URL. This is | |
|
nasko
2015/08/14 22:14:42
nit: s/page/document/
Charlie Reis
2015/08/14 23:23:32
Done.
| |
| 130 // more restrictive than CanRequestURL, since CanRequestURL allows requests | |
| 131 // that might lead to cross-process navigations or ShellExecute (external to | |
|
nasko
2015/08/14 22:14:42
nit: ShellExecute is a Windows specific API. This
Charlie Reis
2015/08/14 23:23:32
Done.
| |
| 132 // the browser). | |
| 133 bool CanCommitURL(int child_id, const GURL& url); | |
| 134 | |
| 129 // Explicit permissions checks for FileSystemURL specified files. | 135 // Explicit permissions checks for FileSystemURL specified files. |
| 130 bool CanReadFileSystemFile(int child_id, const storage::FileSystemURL& url); | 136 bool CanReadFileSystemFile(int child_id, const storage::FileSystemURL& url); |
| 131 bool CanWriteFileSystemFile(int child_id, const storage::FileSystemURL& url); | 137 bool CanWriteFileSystemFile(int child_id, const storage::FileSystemURL& url); |
| 132 bool CanCreateFileSystemFile(int child_id, const storage::FileSystemURL& url); | 138 bool CanCreateFileSystemFile(int child_id, const storage::FileSystemURL& url); |
| 133 bool CanCreateReadWriteFileSystemFile(int child_id, | 139 bool CanCreateReadWriteFileSystemFile(int child_id, |
| 134 const storage::FileSystemURL& url); | 140 const storage::FileSystemURL& url); |
| 135 bool CanCopyIntoFileSystemFile(int child_id, | 141 bool CanCopyIntoFileSystemFile(int child_id, |
| 136 const storage::FileSystemURL& url); | 142 const storage::FileSystemURL& url); |
| 137 bool CanDeleteFileSystemFile(int child_id, const storage::FileSystemURL& url); | 143 bool CanDeleteFileSystemFile(int child_id, const storage::FileSystemURL& url); |
| 138 | 144 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 WorkerToMainProcessMap worker_map_; | 245 WorkerToMainProcessMap worker_map_; |
| 240 | 246 |
| 241 FileSystemPermissionPolicyMap file_system_policy_map_; | 247 FileSystemPermissionPolicyMap file_system_policy_map_; |
| 242 | 248 |
| 243 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 249 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
| 244 }; | 250 }; |
| 245 | 251 |
| 246 } // namespace content | 252 } // namespace content |
| 247 | 253 |
| 248 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 254 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
| OLD | NEW |