Index: chrome/browser/chromeos/fileapi/cros_mount_point_provider.h |
diff --git a/chrome/browser/chromeos/fileapi/cros_mount_point_provider.h b/chrome/browser/chromeos/fileapi/cros_mount_point_provider.h |
index c68589d71e02cccba917f24a73956231384493a3..48f7be0a4ef3562dd176716df2910a8c4001ea80 100644 |
--- a/chrome/browser/chromeos/fileapi/cros_mount_point_provider.h |
+++ b/chrome/browser/chromeos/fileapi/cros_mount_point_provider.h |
@@ -69,6 +69,38 @@ class CrosMountPointProvider |
using fileapi::FileSystemMountPointProvider::OpenFileSystemCallback; |
using fileapi::FileSystemMountPointProvider::DeleteFileSystemCallback; |
+ // This is delegate interface to inject Drive File System without explicit |
+ // dependency in the header file. |
satorux1
2013/07/03 05:44:29
I'm confused
drive::MountPointProviderDelegate is
hidehiko
2013/07/03 08:37:01
Done.
|
+ class Delegate { |
satorux1
2013/07/03 05:44:29
Nested classes are usually avoided:
http://google
hidehiko
2013/07/03 08:37:01
Done.
|
+ public: |
+ virtual ~Delegate() {} |
+ |
+ // Called from CrosMountPointProvider::GetAsyncFileUtil(). |
+ virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( |
+ fileapi::FileSystemType type) = 0; |
+ |
+ // Called from CrosMountPointProvider::CreateFileStreamReader(). |
+ virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( |
+ const fileapi::FileSystemURL& url, |
+ int64 offset, |
+ const base::Time& expected_modification_time, |
+ fileapi::FileSystemContext* context) = 0; |
+ |
+ // Called from CrosMountPointProvider::CreateFileStreamWriter(). |
+ virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( |
+ const fileapi::FileSystemURL& url, |
+ int64 offset, |
+ fileapi::FileSystemContext* context) = 0; |
+ |
+ // Called from CrosMountPointProvider::CreateFileSystemOperation(). |
+ // TODO(hidehiko): Get rid of this method when we merge the |
+ // {Remote,Local}FileSystemOperation. |
+ virtual fileapi::FileSystemOperation* CreateFileSystemOperation( |
+ const fileapi::FileSystemURL& url, |
+ fileapi::FileSystemContext* context, |
+ base::PlatformFileError* error_code) = 0; |
+ }; |
+ |
// CrosMountPointProvider will take an ownership of a |mount_points| |
// reference. On the other hand, |system_mount_points| will be kept as a raw |
// pointer and it should outlive CrosMountPointProvider instance. |
@@ -137,14 +169,15 @@ class CrosMountPointProvider |
base::FilePath* virtual_path) OVERRIDE; |
private: |
- fileapi::RemoteFileSystemProxyInterface* GetRemoteProxy( |
- const std::string& mount_name) const; |
base::FilePath GetFileSystemRootPath(const fileapi::FileSystemURL& url) const; |
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
scoped_ptr<FileAccessPermissions> file_access_permissions_; |
scoped_ptr<fileapi::AsyncFileUtilAdapter> local_file_util_; |
+ // The Delegate instance for the drive file system related operation. |
+ scoped_ptr<Delegate> drive_delegate_; |
+ |
// Mount points specific to the owning context (i.e. per-profile mount |
// points). |
// |