| 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_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "url/gurl.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class FilePath; | 15 class FilePath; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 | 19 |
| 19 // The ChildProcessSecurityPolicy class is used to grant and revoke security | 20 // The ChildProcessSecurityPolicy class is used to grant and revoke security |
| 20 // capabilities for child processes. For example, it restricts whether a child | 21 // capabilities for child processes. For example, it restricts whether a child |
| 21 // process is permitted to load file:// URLs based on whether the process | 22 // process is permitted to load file:// URLs based on whether the process |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 virtual bool CanDeleteFromFileSystem(int child_id, | 147 virtual bool CanDeleteFromFileSystem(int child_id, |
| 147 const std::string& filesystem_id) = 0; | 148 const std::string& filesystem_id) = 0; |
| 148 | 149 |
| 149 // Returns true if the specified child_id has been granted WebUI bindings. | 150 // Returns true if the specified child_id has been granted WebUI bindings. |
| 150 // The browser should check this property before assuming the child process | 151 // The browser should check this property before assuming the child process |
| 151 // is allowed to use WebUI bindings. | 152 // is allowed to use WebUI bindings. |
| 152 virtual bool HasWebUIBindings(int child_id) = 0; | 153 virtual bool HasWebUIBindings(int child_id) = 0; |
| 153 | 154 |
| 154 // Grants permission to send system exclusive message to any MIDI devices. | 155 // Grants permission to send system exclusive message to any MIDI devices. |
| 155 virtual void GrantSendMidiSysExMessage(int child_id) = 0; | 156 virtual void GrantSendMidiSysExMessage(int child_id) = 0; |
| 157 |
| 158 // Returns true if the process is permitted to read and modify the data for |
| 159 // the given origin. This is currently used for cookies and passwords. |
| 160 // Does not affect cookies attached to or set by network requests. |
| 161 // Only might return false if the --site-per-process flag is used. |
| 162 virtual bool CanAccessDataForOrigin(int child_id, const GURL& gurl) = 0; |
| 163 |
| 156 }; | 164 }; |
| 157 | 165 |
| 158 } // namespace content | 166 } // namespace content |
| 159 | 167 |
| 160 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ | 168 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ |
| OLD | NEW |