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

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

Issue 7174002: Change {Obfuscated|Local}FileSystemFileUtil non-Singleton to take an underlying *FileUtil. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. Created 9 years, 5 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool create) = 0; 44 bool create) = 0;
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
55 virtual FileSystemFileUtil* GetFileSystemFileUtil() = 0;
54 }; 56 };
55 57
56 // An interface to control external file system access permissions. 58 // An interface to control external file system access permissions.
57 class ExternalFileSystemMountPointProvider 59 class ExternalFileSystemMountPointProvider
58 : public FileSystemMountPointProvider { 60 : public FileSystemMountPointProvider {
59 public: 61 public:
60 // Grant access to all external file system from extension identified with 62 // Grant access to all external file system from extension identified with
61 // |extension_id|. 63 // |extension_id|.
62 virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0; 64 virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0;
63 // Grants access to |virtual_path| from |origin_url|. 65 // Grants access to |virtual_path| from |origin_url|.
64 virtual void GrantFileAccessToExtension( 66 virtual void GrantFileAccessToExtension(
65 const std::string& extension_id, 67 const std::string& extension_id,
66 const FilePath& virtual_path) = 0; 68 const FilePath& virtual_path) = 0;
67 // Revoke file access from extension identified with |extension_id|. 69 // Revoke file access from extension identified with |extension_id|.
68 virtual void RevokeAccessForExtension( 70 virtual void RevokeAccessForExtension(
69 const std::string& extension_id) = 0; 71 const std::string& extension_id) = 0;
70 // Adds a new mount point. 72 // Adds a new mount point.
71 virtual void AddMountPoint(FilePath mount_point) = 0; 73 virtual void AddMountPoint(FilePath mount_point) = 0;
72 // Remove a mount point. 74 // Remove a mount point.
73 virtual void RemoveMountPoint(FilePath mount_point) = 0; 75 virtual void RemoveMountPoint(FilePath mount_point) = 0;
74 // Gets virtual path by known filesystem path. Returns false when filesystem 76 // Gets virtual path by known filesystem path. Returns false when filesystem
75 // path is not exposed by this provider. 77 // path is not exposed by this provider.
76 virtual bool GetVirtualPath(const FilePath& filesystem_path, 78 virtual bool GetVirtualPath(const FilePath& filesystem_path,
77 FilePath* virtual_path) = 0; 79 FilePath* virtual_path) = 0;
78 }; 80 };
79 81
80 } // namespace fileapi 82 } // namespace fileapi
81 83
82 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 84 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
83
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util_unittest.cc ('k') | webkit/fileapi/file_system_operation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698