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

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

Issue 7470037: [Refactor] to rename and re-layer the file_util stack layers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased on the svn tree. Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Checks if a given |name| contains any restricted names/chars in it. 46 // Checks if a given |name| contains any restricted names/chars in it.
47 // Callable on any thread. 47 // Callable on any thread.
48 virtual bool IsRestrictedFileName(const FilePath& filename) const = 0; 48 virtual bool IsRestrictedFileName(const FilePath& filename) const = 0;
49 49
50 // Returns the list of top level directories that are exposed by this 50 // Returns the list of top level directories that are exposed by this
51 // provider. This list is used to set appropriate child process file access 51 // provider. This list is used to set appropriate child process file access
52 // permissions. 52 // permissions.
53 virtual std::vector<FilePath> GetRootDirectories() const = 0; 53 virtual std::vector<FilePath> GetRootDirectories() const = 0;
54 54
55 virtual FileSystemFileUtil* GetFileSystemFileUtil() = 0; 55 virtual FileSystemFileUtil* GetFileUtil() = 0;
56 }; 56 };
57 57
58 // An interface to control external file system access permissions. 58 // An interface to control external file system access permissions.
59 class ExternalFileSystemMountPointProvider 59 class ExternalFileSystemMountPointProvider
60 : public FileSystemMountPointProvider { 60 : public FileSystemMountPointProvider {
61 public: 61 public:
62 // Grant access to all external file system from extension identified with 62 // Grant access to all external file system from extension identified with
63 // |extension_id|. 63 // |extension_id|.
64 virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0; 64 virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0;
65 // Grants access to |virtual_path| from |origin_url|. 65 // Grants access to |virtual_path| from |origin_url|.
66 virtual void GrantFileAccessToExtension( 66 virtual void GrantFileAccessToExtension(
67 const std::string& extension_id, 67 const std::string& extension_id,
68 const FilePath& virtual_path) = 0; 68 const FilePath& virtual_path) = 0;
69 // Revoke file access from extension identified with |extension_id|. 69 // Revoke file access from extension identified with |extension_id|.
70 virtual void RevokeAccessForExtension( 70 virtual void RevokeAccessForExtension(
71 const std::string& extension_id) = 0; 71 const std::string& extension_id) = 0;
72 // Adds a new mount point. 72 // Adds a new mount point.
73 virtual void AddMountPoint(FilePath mount_point) = 0; 73 virtual void AddMountPoint(FilePath mount_point) = 0;
74 // Remove a mount point. 74 // Remove a mount point.
75 virtual void RemoveMountPoint(FilePath mount_point) = 0; 75 virtual void RemoveMountPoint(FilePath mount_point) = 0;
76 // Gets virtual path by known filesystem path. Returns false when filesystem 76 // Gets virtual path by known filesystem path. Returns false when filesystem
77 // path is not exposed by this provider. 77 // path is not exposed by this provider.
78 virtual bool GetVirtualPath(const FilePath& filesystem_path, 78 virtual bool GetVirtualPath(const FilePath& filesystem_path,
79 FilePath* virtual_path) = 0; 79 FilePath* virtual_path) = 0;
80 }; 80 };
81 81
82 } // namespace fileapi 82 } // namespace fileapi
83 83
84 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 84 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util_unittest.cc ('k') | webkit/fileapi/file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698