| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" | 10 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" |
| 11 | 11 |
| 12 namespace content { |
| 13 class BrowserContext; |
| 14 } // namespace content |
| 15 |
| 12 namespace fileapi { | 16 namespace fileapi { |
| 13 class ExternalMountPoints; | 17 class ExternalMountPoints; |
| 14 } // namespace fileapi | 18 } // namespace fileapi |
| 15 | 19 |
| 16 namespace drive { | 20 namespace drive { |
| 17 | 21 |
| 18 // Delegate implementation of the some methods in chromeos::FileSystemBackend | 22 // Delegate implementation of the some methods in chromeos::FileSystemBackend |
| 19 // for Drive file system. | 23 // for Drive file system. |
| 20 class FileSystemBackendDelegate : public chromeos::FileSystemBackendDelegate { | 24 class FileSystemBackendDelegate : public chromeos::FileSystemBackendDelegate { |
| 21 public: | 25 public: |
| 26 // |browser_context| is currently used to take the ExternalMountPoints. |
| 22 explicit FileSystemBackendDelegate( | 27 explicit FileSystemBackendDelegate( |
| 23 fileapi::ExternalMountPoints* mount_points); | 28 content::BrowserContext* browser_context); |
| 24 virtual ~FileSystemBackendDelegate(); | 29 virtual ~FileSystemBackendDelegate(); |
| 25 | 30 |
| 26 // FileSystemBackend::Delegate overrides. | 31 // FileSystemBackend::Delegate overrides. |
| 27 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( | 32 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( |
| 28 fileapi::FileSystemType type) OVERRIDE; | 33 fileapi::FileSystemType type) OVERRIDE; |
| 29 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( | 34 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( |
| 30 const fileapi::FileSystemURL& url, | 35 const fileapi::FileSystemURL& url, |
| 31 int64 offset, | 36 int64 offset, |
| 32 const base::Time& expected_modification_time, | 37 const base::Time& expected_modification_time, |
| 33 fileapi::FileSystemContext* context) OVERRIDE; | 38 fileapi::FileSystemContext* context) OVERRIDE; |
| 34 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( | 39 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( |
| 35 const fileapi::FileSystemURL& url, | 40 const fileapi::FileSystemURL& url, |
| 36 int64 offset, | 41 int64 offset, |
| 37 fileapi::FileSystemContext* context) OVERRIDE; | 42 fileapi::FileSystemContext* context) OVERRIDE; |
| 38 virtual fileapi::FileSystemOperation* CreateFileSystemOperation( | 43 virtual fileapi::FileSystemOperation* CreateFileSystemOperation( |
| 39 const fileapi::FileSystemURL& url, | 44 const fileapi::FileSystemURL& url, |
| 40 fileapi::FileSystemContext* context, | 45 fileapi::FileSystemContext* context, |
| 41 base::PlatformFileError* error_code) OVERRIDE; | 46 base::PlatformFileError* error_code) OVERRIDE; |
| 42 | 47 |
| 43 private: | 48 private: |
| 44 scoped_refptr<fileapi::ExternalMountPoints> mount_points_; | 49 scoped_refptr<fileapi::ExternalMountPoints> mount_points_; |
| 45 | 50 |
| 46 DISALLOW_COPY_AND_ASSIGN(FileSystemBackendDelegate); | 51 DISALLOW_COPY_AND_ASSIGN(FileSystemBackendDelegate); |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 } // namespace drive | 54 } // namespace drive |
| 50 | 55 |
| 51 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_BACKEND_DELEGATE_H_ |
| OLD | NEW |