| 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" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 virtual void GrantCreateFileForFileSystem( | 100 virtual void GrantCreateFileForFileSystem( |
| 101 int child_id, | 101 int child_id, |
| 102 const std::string& filesystem_id) = 0; | 102 const std::string& filesystem_id) = 0; |
| 103 | 103 |
| 104 // Grants permission to copy-into filesystem |filesystem_id|. 'copy-into' | 104 // Grants permission to copy-into filesystem |filesystem_id|. 'copy-into' |
| 105 // is used to allow copying files into the destination filesystem without | 105 // is used to allow copying files into the destination filesystem without |
| 106 // granting more general create and write permissions. | 106 // granting more general create and write permissions. |
| 107 virtual void GrantCopyIntoFileSystem(int child_id, | 107 virtual void GrantCopyIntoFileSystem(int child_id, |
| 108 const std::string& filesystem_id) = 0; | 108 const std::string& filesystem_id) = 0; |
| 109 | 109 |
| 110 // Grants permission to delete from filesystem |filesystem_id|. 'delete-from' |
| 111 // is used to allow deleting files into the destination filesystem without |
| 112 // granting more general create and write permissions. |
| 113 virtual void GrantDeleteFromFileSystem(int child_id, |
| 114 const std::string& filesystem_id) = 0; |
| 115 |
| 110 // Grants the child process the capability to access URLs of the provided | 116 // Grants the child process the capability to access URLs of the provided |
| 111 // scheme. | 117 // scheme. |
| 112 virtual void GrantScheme(int child_id, const std::string& scheme) = 0; | 118 virtual void GrantScheme(int child_id, const std::string& scheme) = 0; |
| 113 | 119 |
| 114 // Returns true if read access has been granted to |filesystem_id|. | 120 // Returns true if read access has been granted to |filesystem_id|. |
| 115 virtual bool CanReadFileSystem(int child_id, | 121 virtual bool CanReadFileSystem(int child_id, |
| 116 const std::string& filesystem_id) = 0; | 122 const std::string& filesystem_id) = 0; |
| 117 | 123 |
| 118 // Returns true if read and write access has been granted to |filesystem_id|. | 124 // Returns true if read and write access has been granted to |filesystem_id|. |
| 119 virtual bool CanReadWriteFileSystem(int child_id, | 125 virtual bool CanReadWriteFileSystem(int child_id, |
| 120 const std::string& filesystem_id) = 0; | 126 const std::string& filesystem_id) = 0; |
| 121 | 127 |
| 122 // Returns true if copy-into access has been granted to |filesystem_id|. | 128 // Returns true if copy-into access has been granted to |filesystem_id|. |
| 123 virtual bool CanCopyIntoFileSystem(int child_id, | 129 virtual bool CanCopyIntoFileSystem(int child_id, |
| 124 const std::string& filesystem_id) = 0; | 130 const std::string& filesystem_id) = 0; |
| 131 |
| 132 // Returns true if delete-from access has been granted to |filesystem_id|. |
| 133 virtual bool CanDeleteFromFileSystem(int child_id, |
| 134 const std::string& filesystem_id) = 0; |
| 125 }; | 135 }; |
| 126 | 136 |
| 127 }; // namespace content | 137 }; // namespace content |
| 128 | 138 |
| 129 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ | 139 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ |
| OLD | NEW |