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

Side by Side Diff: webkit/fileapi/file_system_mount_point_provider.h

Issue 10823273: Integrate external mount points to IsolatedContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wording fix Created 8 years, 4 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 WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const GURL& origin_url, 115 const GURL& origin_url,
116 FileSystemType type, 116 FileSystemType type,
117 FileSystemContext* context, 117 FileSystemContext* context,
118 const DeleteFileSystemCallback& callback) = 0; 118 const DeleteFileSystemCallback& callback) = 0;
119 }; 119 };
120 120
121 // An interface to control external file system access permissions. 121 // An interface to control external file system access permissions.
122 class ExternalFileSystemMountPointProvider 122 class ExternalFileSystemMountPointProvider
123 : public FileSystemMountPointProvider { 123 : public FileSystemMountPointProvider {
124 public: 124 public:
125 // Returns the list of top level directories that are exposed by this 125 // A struct used to represent an external mount point.
126 // provider. This list is used to set appropriate child process file access 126 struct MountInfo {
127 // permissions. 127 std::string mount_name;
128 virtual std::vector<FilePath> GetRootDirectories() const = 0; 128 FilePath root_path;
129 // Grant access to all external file system from extension identified with 129 };
130
131 // Returns the list of mount names and associated directories that are
132 // exposed by this provider. This list is used to set appropriate child
133 // process file access permissions.
134 virtual std::vector<MountInfo> GetMountPoints() const = 0;
135 // Grants access to all external file system from extension identified with
130 // |extension_id|. 136 // |extension_id|.
131 virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0; 137 virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0;
132 // Grants access to |virtual_path| from |origin_url|. 138 // Grants access to |virtual_path| from |origin_url|.
133 virtual void GrantFileAccessToExtension( 139 virtual void GrantFileAccessToExtension(
134 const std::string& extension_id, 140 const std::string& extension_id,
135 const FilePath& virtual_path) = 0; 141 const FilePath& virtual_path) = 0;
136 // Revoke file access from extension identified with |extension_id|. 142 // Revokes file access from extension identified with |extension_id|.
137 virtual void RevokeAccessForExtension( 143 virtual void RevokeAccessForExtension(
138 const std::string& extension_id) = 0; 144 const std::string& extension_id) = 0;
139 // Checks if a given |mount_point| already exists. 145 // Checks if a given |mount_point| already exists.
140 virtual bool HasMountPoint(const FilePath& mount_point) = 0; 146 virtual bool HasMountPoint(const FilePath& mount_point) = 0;
141 // Adds a new local mount point. 147 // Adds a new local mount point.
142 virtual void AddLocalMountPoint(const FilePath& mount_point) = 0; 148 virtual void AddLocalMountPoint(const FilePath& mount_point) = 0;
143 // Adds a new remote mount point. 149 // Adds a new remote mount point.
144 virtual void AddRemoteMountPoint( 150 virtual void AddRemoteMountPoint(
145 const FilePath& mount_point, 151 const FilePath& mount_point,
146 RemoteFileSystemProxyInterface* remote_proxy) = 0; 152 RemoteFileSystemProxyInterface* remote_proxy) = 0;
147 // Remove a mount point. 153 // Removes a mount point.
148 virtual void RemoveMountPoint(const FilePath& mount_point) = 0; 154 virtual void RemoveMountPoint(const FilePath& mount_point) = 0;
149 // Gets virtual path by known filesystem path. Returns false when filesystem 155 // Gets virtual path by known filesystem path. Returns false when filesystem
150 // path is not exposed by this provider. 156 // path is not exposed by this provider.
151 virtual bool GetVirtualPath(const FilePath& file_system_path, 157 virtual bool GetVirtualPath(const FilePath& file_system_path,
152 FilePath* virtual_path) = 0; 158 FilePath* virtual_path) = 0;
153 }; 159 };
154 160
155 } // namespace fileapi 161 } // namespace fileapi
156 162
157 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 163 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698