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

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

Issue 9380040: Revert 121620 - Refactor FileSystemOperation to take callback for each method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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_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
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/platform_file.h" 14 #include "base/platform_file.h"
15 #include "base/platform_file.h" 15 #include "base/platform_file.h"
16 #include "webkit/fileapi/file_system_types.h" 16 #include "webkit/fileapi/file_system_types.h"
17 17
18 class GURL; 18 class GURL;
19 19
20 namespace base { 20 namespace base {
21 class MessageLoopProxy; 21 class MessageLoopProxy;
22 } 22 }
23 23
24 namespace fileapi { 24 namespace fileapi {
25 25
26 class FileSystemCallbackDispatcher;
26 class FileSystemContext; 27 class FileSystemContext;
27 class FileSystemFileUtil; 28 class FileSystemFileUtil;
28 class FileSystemOperationInterface; 29 class FileSystemOperationInterface;
29 30
30 // An interface to provide mount-point-specific path-related utilities 31 // An interface to provide mount-point-specific path-related utilities
31 // and specialized FileSystemFileUtil instance. 32 // and specialized FileSystemFileUtil instance.
32 class FileSystemMountPointProvider { 33 class FileSystemMountPointProvider {
33 public: 34 public:
34 // Callback for ValidateFileSystemRoot. 35 // Callback for ValidateFileSystemRoot.
35 typedef base::Callback<void(base::PlatformFileError error)> 36 typedef base::Callback<void(base::PlatformFileError error)>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 77
77 // Returns a new instance of the specialized FileSystemOperation for this 78 // Returns a new instance of the specialized FileSystemOperation for this
78 // mount point based on the given triplet of |origin_url|, |file_system_type| 79 // mount point based on the given triplet of |origin_url|, |file_system_type|
79 // and |virtual_path|. 80 // and |virtual_path|.
80 // This method is usually dispatched by 81 // This method is usually dispatched by
81 // FileSystemContext::CreateFileSystemOperation. 82 // FileSystemContext::CreateFileSystemOperation.
82 virtual FileSystemOperationInterface* CreateFileSystemOperation( 83 virtual FileSystemOperationInterface* CreateFileSystemOperation(
83 const GURL& origin_url, 84 const GURL& origin_url,
84 FileSystemType file_system_type, 85 FileSystemType file_system_type,
85 const FilePath& virtual_path, 86 const FilePath& virtual_path,
87 scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
86 base::MessageLoopProxy* file_proxy, 88 base::MessageLoopProxy* file_proxy,
87 FileSystemContext* context) const = 0; 89 FileSystemContext* context) const = 0;
88 }; 90 };
89 91
90 // An interface to control external file system access permissions. 92 // An interface to control external file system access permissions.
91 class ExternalFileSystemMountPointProvider 93 class ExternalFileSystemMountPointProvider
92 : public FileSystemMountPointProvider { 94 : public FileSystemMountPointProvider {
93 public: 95 public:
94 // Grant access to all external file system from extension identified with 96 // Grant access to all external file system from extension identified with
95 // |extension_id|. 97 // |extension_id|.
(...skipping 11 matching lines...) Expand all
107 virtual void RemoveMountPoint(FilePath mount_point) = 0; 109 virtual void RemoveMountPoint(FilePath mount_point) = 0;
108 // Gets virtual path by known filesystem path. Returns false when filesystem 110 // Gets virtual path by known filesystem path. Returns false when filesystem
109 // path is not exposed by this provider. 111 // path is not exposed by this provider.
110 virtual bool GetVirtualPath(const FilePath& filesystem_path, 112 virtual bool GetVirtualPath(const FilePath& filesystem_path,
111 FilePath* virtual_path) = 0; 113 FilePath* virtual_path) = 0;
112 }; 114 };
113 115
114 } // namespace fileapi 116 } // namespace fileapi
115 117
116 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 118 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_dir_url_request_job.cc ('k') | webkit/fileapi/file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698