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

Side by Side Diff: webkit/fileapi/file_system_context.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTEXT_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // For non-cracked isolated and external mount points, returns a FileSystemURL 235 // For non-cracked isolated and external mount points, returns a FileSystemURL
236 // created by cracking |url|. The url is cracked using MountPoints registered 236 // created by cracking |url|. The url is cracked using MountPoints registered
237 // as |url_crackers_|. If the url cannot be cracked, returns invalid 237 // as |url_crackers_|. If the url cannot be cracked, returns invalid
238 // FileSystemURL. 238 // FileSystemURL.
239 // 239 //
240 // If the original url does not point to an isolated or external filesystem, 240 // If the original url does not point to an isolated or external filesystem,
241 // returns the original url, without attempting to crack it. 241 // returns the original url, without attempting to crack it.
242 FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const; 242 FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const;
243 243
244 // If the url has underlying file system url, returns its mount type.
245 // Otherwise returns kFileSystemTypeUnknown.
246 FileSystemType GetUnderlyingMountType(const FileSystemURL& url) const;
247
248 // Converts full file path to a virtual path under mount point contained in
249 // one of the url crackers that support the passed mount type.
250 // Returns whether the path can be converted.
251 bool GetVirtualPath(FileSystemType mount_type,
252 const base::FilePath& full_path,
253 base::FilePath* virtual_path) const;
254
244 // Returns the appropriate FileUtil instance for the given |type|. 255 // Returns the appropriate FileUtil instance for the given |type|.
245 // This may return NULL if it is given an invalid type or the filesystem 256 // This may return NULL if it is given an invalid type or the filesystem
246 // does not support synchronous file operations. 257 // does not support synchronous file operations.
247 FileSystemFileUtil* GetFileUtil(FileSystemType type) const; 258 FileSystemFileUtil* GetFileUtil(FileSystemType type) const;
248 259
249 scoped_ptr<FileSystemTaskRunners> task_runners_; 260 scoped_ptr<FileSystemTaskRunners> task_runners_;
250 261
251 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; 262 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
252 263
253 // Regular mount point providers. 264 // Regular mount point providers.
(...skipping 24 matching lines...) Expand all
278 289
279 struct DefaultContextDeleter { 290 struct DefaultContextDeleter {
280 static void Destruct(const FileSystemContext* context) { 291 static void Destruct(const FileSystemContext* context) {
281 context->DeleteOnCorrectThread(); 292 context->DeleteOnCorrectThread();
282 } 293 }
283 }; 294 };
284 295
285 } // namespace fileapi 296 } // namespace fileapi
286 297
287 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 298 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698