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

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

Issue 12258021: Fix filesystem API file_handlers to work for drive on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // MountPoints overrides. 74 // MountPoints overrides.
75 virtual bool HandlesFileSystemMountType(FileSystemType type) const OVERRIDE; 75 virtual bool HandlesFileSystemMountType(FileSystemType type) const OVERRIDE;
76 virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE; 76 virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE;
77 virtual bool GetRegisteredPath(const std::string& mount_name, 77 virtual bool GetRegisteredPath(const std::string& mount_name,
78 base::FilePath* path) const OVERRIDE; 78 base::FilePath* path) const OVERRIDE;
79 virtual bool CrackVirtualPath(const base::FilePath& virtual_path, 79 virtual bool CrackVirtualPath(const base::FilePath& virtual_path,
80 std::string* mount_name, 80 std::string* mount_name,
81 FileSystemType* type, 81 FileSystemType* type,
82 base::FilePath* path) const OVERRIDE; 82 base::FilePath* path) const OVERRIDE;
83 virtual FileSystemURL CrackURL(const GURL& url) const OVERRIDE; 83 virtual FileSystemURL CrackURL(const GURL& url) const OVERRIDE;
84 virtual FileSystemURL CrackFileSystemURL(
85 const FileSystemURL& url) const OVERRIDE;
84 virtual FileSystemURL CreateCrackedFileSystemURL( 86 virtual FileSystemURL CreateCrackedFileSystemURL(
85 const GURL& origin, 87 const GURL& origin,
86 FileSystemType type, 88 FileSystemType type,
87 const base::FilePath& path) const OVERRIDE; 89 const base::FilePath& path) const OVERRIDE;
88 90
89 // Retrieves the remote file system proxy for the registered file system. 91 // Retrieves the remote file system proxy for the registered file system.
90 // Returns NULL if there is no file system with the given name, or if the file 92 // Returns NULL if there is no file system with the given name, or if the file
91 // system does not have a remote file system proxy. 93 // system does not have a remote file system proxy.
92 RemoteFileSystemProxyInterface* GetRemoteFileSystemProxy( 94 RemoteFileSystemProxyInterface* GetRemoteFileSystemProxy(
93 const std::string& mount_name) const; 95 const std::string& mount_name) const;
94 96
95 // Returns a list of registered MountPointInfos (of <mount_name, path>). 97 // Returns a list of registered MountPointInfos (of <mount_name, path>).
96 void AddMountPointInfosTo(std::vector<MountPointInfo>* mount_points) const; 98 void AddMountPointInfosTo(std::vector<MountPointInfo>* mount_points) const;
97 99
98 // Converts a path on a registered file system to virtual path relative to the 100 // Converts a path on a registered file system to virtual path relative to the
99 // file system root. E.g. if 'Downloads' file system is mapped to 101 // file system root. E.g. if 'Downloads' file system is mapped to
100 // '/usr/local/home/Downloads', and |absolute| path is set to 102 // '/usr/local/home/Downloads', and |absolute| path is set to
101 // '/usr/local/home/Downloads/foo', the method will set |virtual_path| to 103 // '/usr/local/home/Downloads/foo', the method will set |virtual_path| to
102 // 'Downloads/foo'. 104 // 'Downloads/foo'.
103 // Returns false if the path cannot be resolved (e.g. if the path is not 105 // Returns false if the path cannot be resolved (e.g. if the path is not
104 // part of any registered filesystem). 106 // part of any registered filesystem).
105 // 107 //
106 // Returned virtual_path will have normalized path separators. 108 // Returned virtual_path will have normalized path separators.
107 bool GetVirtualPath(const base::FilePath& absolute_path, 109 bool GetVirtualPath(const base::FilePath& absolute_path,
108 base::FilePath* virtual_path); 110 base::FilePath* virtual_path) const;
109 111
110 // Returns the virtual root path that looks like /<mount_name>. 112 // Returns the virtual root path that looks like /<mount_name>.
111 base::FilePath CreateVirtualRootPath(const std::string& mount_name) const; 113 base::FilePath CreateVirtualRootPath(const std::string& mount_name) const;
112 114
113 private: 115 private:
114 friend class base::RefCountedThreadSafe<ExternalMountPoints>; 116 friend class base::RefCountedThreadSafe<ExternalMountPoints>;
115 117
116 // Represents each file system instance (defined in the .cc). 118 // Represents each file system instance (defined in the .cc).
117 class Instance; 119 class Instance;
118 120
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 base::FilePath GetVirtualRootPath() const; 158 base::FilePath GetVirtualRootPath() const;
157 159
158 private: 160 private:
159 const std::string mount_name_; 161 const std::string mount_name_;
160 }; 162 };
161 163
162 } // namespace fileapi 164 } // namespace fileapi
163 165
164 #endif // WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ 166 #endif // WEBKIT_FILEAPI_EXTERNAL_MOUNT_POINTS_H_
165 167
OLDNEW
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/fileapi/external_mount_points.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698