OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_EXTERNAL_MOUNT_POINTS_H_ | 5 #ifndef WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ |
6 #define WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ | 6 #define WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "webkit/fileapi/file_system_types.h" | 14 #include "webkit/fileapi/file_system_types.h" |
15 #include "webkit/fileapi/mount_points.h" | 15 #include "webkit/fileapi/mount_points.h" |
16 #include "webkit/storage/webkit_storage_export.h" | 16 #include "webkit/storage/webkit_storage_export.h" |
17 | 17 |
18 class FilePath; | 18 class FilePath; |
19 | 19 |
20 namespace fileapi { | 20 namespace fileapi { |
21 class FileSystemURL; | |
21 class RemoteFileSystemProxyInterface; | 22 class RemoteFileSystemProxyInterface; |
22 } | 23 } |
23 | 24 |
24 namespace fileapi { | 25 namespace fileapi { |
25 | 26 |
26 // Manages external filesystem namespaces that are identified by 'mount name' | 27 // Manages external filesystem namespaces that are identified by 'mount name' |
27 // and are persisted until RevokeFileSystem is called. | 28 // and are persisted until RevokeFileSystem is called. |
28 // Files in an external filesystem are identified by a filesystem URL like: | 29 // Files in an external filesystem are identified by a filesystem URL like: |
29 // | 30 // |
30 // filesystem:<origin>/external/<mount_name>/relative/path | 31 // filesystem:<origin>/external/<mount_name>/relative/path |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 | 64 |
64 // Same as |RegisterExternalFileSystem|, but also registers a remote file | 65 // Same as |RegisterExternalFileSystem|, but also registers a remote file |
65 // system proxy for the file system. | 66 // system proxy for the file system. |
66 bool RegisterRemoteFileSystem(const std::string& mount_name, | 67 bool RegisterRemoteFileSystem(const std::string& mount_name, |
67 FileSystemType type, | 68 FileSystemType type, |
68 RemoteFileSystemProxyInterface* remote_proxy, | 69 RemoteFileSystemProxyInterface* remote_proxy, |
69 const FilePath& path); | 70 const FilePath& path); |
70 | 71 |
71 // MountPoints overrides. | 72 // MountPoints overrides. |
72 virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE; | 73 virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE; |
74 virtual bool CanHandleURL(const FileSystemURL& url) const OVERRIDE; | |
75 virtual FileSystemURL CrackFileSystemURL( | |
76 const FileSystemURL& url) const OVERRIDE; | |
kinuko
2013/01/21 06:57:33
Now these two methods (CanHandleURL and CrackFileS
tbarzic
2013/01/22 21:30:56
ok, I got rid of CrackFileSystemURL (and use Creat
| |
77 virtual FileSystemURL CrackURL(const GURL& url) const OVERRIDE; | |
78 virtual FileSystemURL CreateCrackedFileSystemURL( | |
79 const GURL& origin, | |
80 FileSystemType type, | |
81 const FilePath& path) const OVERRIDE; | |
73 virtual bool GetRegisteredPath(const std::string& mount_name, | 82 virtual bool GetRegisteredPath(const std::string& mount_name, |
74 FilePath* path) const OVERRIDE; | 83 FilePath* path) const OVERRIDE; |
75 virtual bool CrackVirtualPath(const FilePath& virtual_path, | 84 virtual bool CrackVirtualPath(const FilePath& virtual_path, |
76 std::string* mount_name, | 85 std::string* mount_name, |
77 FileSystemType* type, | 86 FileSystemType* type, |
78 FilePath* path) const OVERRIDE; | 87 FilePath* path) const OVERRIDE; |
79 | 88 |
80 // Retrieves the remote file system proxy for the registered file system. | 89 // Retrieves the remote file system proxy for the registered file system. |
81 // Returns NULL if there is no file system with the given name, or if the file | 90 // Returns NULL if there is no file system with the given name, or if the file |
82 // system does not have a remote file system proxy. | 91 // system does not have a remote file system proxy. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 FilePath GetVirtualRootPath() const; | 155 FilePath GetVirtualRootPath() const; |
147 | 156 |
148 private: | 157 private: |
149 const std::string mount_name_; | 158 const std::string mount_name_; |
150 }; | 159 }; |
151 | 160 |
152 } // namespace fileapi | 161 } // namespace fileapi |
153 | 162 |
154 #endif // WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ | 163 #endif // WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ |
155 | 164 |
OLD | NEW |