| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 class SecurityState; | 169 class SecurityState; |
| 170 | 170 |
| 171 typedef std::set<std::string> SchemeSet; | 171 typedef std::set<std::string> SchemeSet; |
| 172 typedef std::map<int, SecurityState*> SecurityStateMap; | 172 typedef std::map<int, SecurityState*> SecurityStateMap; |
| 173 typedef std::map<int, int> WorkerToMainProcessMap; | 173 typedef std::map<int, int> WorkerToMainProcessMap; |
| 174 typedef std::map<storage::FileSystemType, int> FileSystemPermissionPolicyMap; | 174 typedef std::map<storage::FileSystemType, int> FileSystemPermissionPolicyMap; |
| 175 | 175 |
| 176 // Obtain an instance of ChildProcessSecurityPolicyImpl via GetInstance(). | 176 // Obtain an instance of ChildProcessSecurityPolicyImpl via GetInstance(). |
| 177 ChildProcessSecurityPolicyImpl(); | 177 ChildProcessSecurityPolicyImpl(); |
| 178 friend struct DefaultSingletonTraits<ChildProcessSecurityPolicyImpl>; | 178 friend struct base::DefaultSingletonTraits<ChildProcessSecurityPolicyImpl>; |
| 179 | 179 |
| 180 // Adds child process during registration. | 180 // Adds child process during registration. |
| 181 void AddChild(int child_id); | 181 void AddChild(int child_id); |
| 182 | 182 |
| 183 // Determines if certain permissions were granted for a file to given child | 183 // Determines if certain permissions were granted for a file to given child |
| 184 // process. |permissions| is an internally defined bit-set. | 184 // process. |permissions| is an internally defined bit-set. |
| 185 bool ChildProcessHasPermissionsForFile(int child_id, | 185 bool ChildProcessHasPermissionsForFile(int child_id, |
| 186 const base::FilePath& file, | 186 const base::FilePath& file, |
| 187 int permissions); | 187 int permissions); |
| 188 | 188 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 WorkerToMainProcessMap worker_map_; | 245 WorkerToMainProcessMap worker_map_; |
| 246 | 246 |
| 247 FileSystemPermissionPolicyMap file_system_policy_map_; | 247 FileSystemPermissionPolicyMap file_system_policy_map_; |
| 248 | 248 |
| 249 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); | 249 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 } // namespace content | 252 } // namespace content |
| 253 | 253 |
| 254 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ | 254 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
| OLD | NEW |