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

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

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 years, 11 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) 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const FilePath& path); 63 const FilePath& path);
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.
73 virtual bool HandlesFileSystemMountType(FileSystemType type) const OVERRIDE;
72 virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE; 74 virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE;
73 virtual bool GetRegisteredPath(const std::string& mount_name, 75 virtual bool GetRegisteredPath(const std::string& mount_name,
74 FilePath* path) const OVERRIDE; 76 FilePath* path) const OVERRIDE;
75 virtual bool CrackVirtualPath(const FilePath& virtual_path, 77 virtual bool CrackVirtualPath(const FilePath& virtual_path,
76 std::string* mount_name, 78 std::string* mount_name,
77 FileSystemType* type, 79 FileSystemType* type,
78 FilePath* path) const OVERRIDE; 80 FilePath* path) const OVERRIDE;
81 virtual FileSystemURL CrackURL(const GURL& url) const OVERRIDE;
82 virtual FileSystemURL CreateCrackedFileSystemURL(
83 const GURL& origin,
84 FileSystemType type,
85 const FilePath& path) const OVERRIDE;
79 86
80 // Retrieves the remote file system proxy for the registered file system. 87 // 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 88 // 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. 89 // system does not have a remote file system proxy.
83 RemoteFileSystemProxyInterface* GetRemoteFileSystemProxy( 90 RemoteFileSystemProxyInterface* GetRemoteFileSystemProxy(
84 const std::string& mount_name) const; 91 const std::string& mount_name) const;
85 92
86 // Returns a list of registered MountPointInfos (of <mount_name, path>). 93 // Returns a list of registered MountPointInfos (of <mount_name, path>).
87 void AddMountPointInfosTo(std::vector<MountPointInfo>* mount_points) const; 94 void AddMountPointInfosTo(std::vector<MountPointInfo>* mount_points) const;
88 95
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 FilePath GetVirtualRootPath() const; 153 FilePath GetVirtualRootPath() const;
147 154
148 private: 155 private:
149 const std::string mount_name_; 156 const std::string mount_name_;
150 }; 157 };
151 158
152 } // namespace fileapi 159 } // namespace fileapi
153 160
154 #endif // WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ 161 #endif // WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_
155 162
OLDNEW
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider_unittest.cc ('k') | webkit/fileapi/external_mount_points.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698