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_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 22 matching lines...) Expand all Loading... | |
| 33 static CONTENT_EXPORT ChildProcessSecurityPolicy* GetInstance(); | 33 static CONTENT_EXPORT ChildProcessSecurityPolicy* GetInstance(); |
| 34 | 34 |
| 35 // Web-safe schemes can be requested by any child process. Once a web-safe | 35 // Web-safe schemes can be requested by any child process. Once a web-safe |
| 36 // scheme has been registered, any child process can request URLs with | 36 // scheme has been registered, any child process can request URLs with |
| 37 // that scheme. There is no mechanism for revoking web-safe schemes. | 37 // that scheme. There is no mechanism for revoking web-safe schemes. |
| 38 virtual void RegisterWebSafeScheme(const std::string& scheme) = 0; | 38 virtual void RegisterWebSafeScheme(const std::string& scheme) = 0; |
| 39 | 39 |
| 40 // Returns true iff |scheme| has been registered as a web-safe scheme. | 40 // Returns true iff |scheme| has been registered as a web-safe scheme. |
| 41 virtual bool IsWebSafeScheme(const std::string& scheme) = 0; | 41 virtual bool IsWebSafeScheme(const std::string& scheme) = 0; |
| 42 | 42 |
| 43 // Returns true iff |scheme| has been registered as a pseudo-scheme | |
|
jam
2014/05/13 21:38:25
do we really want to expose this concept outside c
Fady Samuel
2014/05/15 20:02:57
We need to support about:, but that's it. We don't
| |
| 44 virtual bool IsPseudoScheme(const std::string& scheme) = 0; | |
| 45 | |
| 43 // This permission grants only read access to a file. | 46 // This permission grants only read access to a file. |
| 44 // Whenever the user picks a file from a <input type="file"> element, the | 47 // Whenever the user picks a file from a <input type="file"> element, the |
| 45 // browser should call this function to grant the child process the capability | 48 // browser should call this function to grant the child process the capability |
| 46 // to upload the file to the web. Grants FILE_PERMISSION_READ_ONLY. | 49 // to upload the file to the web. Grants FILE_PERMISSION_READ_ONLY. |
| 47 virtual void GrantReadFile(int child_id, const base::FilePath& file) = 0; | 50 virtual void GrantReadFile(int child_id, const base::FilePath& file) = 0; |
| 48 | 51 |
| 49 // This permission grants creation, read, and full write access to a file, | 52 // This permission grants creation, read, and full write access to a file, |
| 50 // including attributes. | 53 // including attributes. |
| 51 virtual void GrantCreateReadWriteFile(int child_id, | 54 virtual void GrantCreateReadWriteFile(int child_id, |
| 52 const base::FilePath& file) = 0; | 55 const base::FilePath& file) = 0; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 const std::string& filesystem_id) = 0; | 146 const std::string& filesystem_id) = 0; |
| 144 | 147 |
| 145 // Returns true if delete-from access has been granted to |filesystem_id|. | 148 // Returns true if delete-from access has been granted to |filesystem_id|. |
| 146 virtual bool CanDeleteFromFileSystem(int child_id, | 149 virtual bool CanDeleteFromFileSystem(int child_id, |
| 147 const std::string& filesystem_id) = 0; | 150 const std::string& filesystem_id) = 0; |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace content | 153 } // namespace content |
| 151 | 154 |
| 152 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ | 155 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ |
| OLD | NEW |