Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Side by Side Diff: content/public/browser/child_process_security_policy.h

Issue 185393012: Change media galleries to external file system type to add toURL support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Whenever the user picks a file from a <input type="file"> element, the 44 // 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 45 // 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. 46 // to upload the file to the web. Grants FILE_PERMISSION_READ_ONLY.
47 virtual void GrantReadFile(int child_id, const base::FilePath& file) = 0; 47 virtual void GrantReadFile(int child_id, const base::FilePath& file) = 0;
48 48
49 // This permission grants creation, read, and full write access to a file, 49 // This permission grants creation, read, and full write access to a file,
50 // including attributes. 50 // including attributes.
51 virtual void GrantCreateReadWriteFile(int child_id, 51 virtual void GrantCreateReadWriteFile(int child_id,
52 const base::FilePath& file) = 0; 52 const base::FilePath& file) = 0;
53 53
54 // This permission grants copy-into permission for |dir|.
55 virtual void GrantCopyInto(int child_id, const base::FilePath& dir) = 0;
56
57 // This permission grants delete permission for |dir|.
58 virtual void GrantDeleteFrom(int child_id, const base::FilePath& dir) = 0;
59
54 // These methods verify whether or not the child process has been granted 60 // These methods verify whether or not the child process has been granted
55 // permissions perform these functions on |file|. 61 // permissions perform these functions on |file|.
56 62
57 // Before servicing a child process's request to upload a file to the web, the 63 // Before servicing a child process's request to upload a file to the web, the
58 // browser should call this method to determine whether the process has the 64 // browser should call this method to determine whether the process has the
59 // capability to upload the requested file. 65 // capability to upload the requested file.
60 virtual bool CanReadFile(int child_id, const base::FilePath& file) = 0; 66 virtual bool CanReadFile(int child_id, const base::FilePath& file) = 0;
61 virtual bool CanCreateReadWriteFile(int child_id, 67 virtual bool CanCreateReadWriteFile(int child_id,
62 const base::FilePath& file) = 0; 68 const base::FilePath& file) = 0;
63 69
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const std::string& filesystem_id) = 0; 143 const std::string& filesystem_id) = 0;
138 144
139 // Returns true if delete-from access has been granted to |filesystem_id|. 145 // Returns true if delete-from access has been granted to |filesystem_id|.
140 virtual bool CanDeleteFromFileSystem(int child_id, 146 virtual bool CanDeleteFromFileSystem(int child_id,
141 const std::string& filesystem_id) = 0; 147 const std::string& filesystem_id) = 0;
142 }; 148 };
143 149
144 } // namespace content 150 } // namespace content
145 151
146 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_ 152 #endif // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_SECURITY_POLICY_H_
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_impl.cc ('k') | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698