| OLD | NEW |
| 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 CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const std::string& extension_id, | 48 const std::string& extension_id, |
| 49 MediaGalleryPrefId pref_id); | 49 MediaGalleryPrefId pref_id); |
| 50 | 50 |
| 51 static bool AttemptAutoMountForURLRequest( | 51 static bool AttemptAutoMountForURLRequest( |
| 52 const net::URLRequest* url_request, | 52 const net::URLRequest* url_request, |
| 53 const storage::FileSystemURL& filesystem_url, | 53 const storage::FileSystemURL& filesystem_url, |
| 54 const std::string& storage_domain, | 54 const std::string& storage_domain, |
| 55 const base::Callback<void(base::File::Error result)>& callback); | 55 const base::Callback<void(base::File::Error result)>& callback); |
| 56 | 56 |
| 57 // FileSystemBackend implementation. | 57 // FileSystemBackend implementation. |
| 58 virtual bool CanHandleType(storage::FileSystemType type) const OVERRIDE; | 58 virtual bool CanHandleType(storage::FileSystemType type) const override; |
| 59 virtual void Initialize(storage::FileSystemContext* context) OVERRIDE; | 59 virtual void Initialize(storage::FileSystemContext* context) override; |
| 60 virtual void ResolveURL(const storage::FileSystemURL& url, | 60 virtual void ResolveURL(const storage::FileSystemURL& url, |
| 61 storage::OpenFileSystemMode mode, | 61 storage::OpenFileSystemMode mode, |
| 62 const OpenFileSystemCallback& callback) OVERRIDE; | 62 const OpenFileSystemCallback& callback) override; |
| 63 virtual storage::AsyncFileUtil* GetAsyncFileUtil( | 63 virtual storage::AsyncFileUtil* GetAsyncFileUtil( |
| 64 storage::FileSystemType type) OVERRIDE; | 64 storage::FileSystemType type) override; |
| 65 virtual storage::WatcherManager* GetWatcherManager( | 65 virtual storage::WatcherManager* GetWatcherManager( |
| 66 storage::FileSystemType type) OVERRIDE; | 66 storage::FileSystemType type) override; |
| 67 virtual storage::CopyOrMoveFileValidatorFactory* | 67 virtual storage::CopyOrMoveFileValidatorFactory* |
| 68 GetCopyOrMoveFileValidatorFactory(storage::FileSystemType type, | 68 GetCopyOrMoveFileValidatorFactory(storage::FileSystemType type, |
| 69 base::File::Error* error_code) OVERRIDE; | 69 base::File::Error* error_code) override; |
| 70 virtual storage::FileSystemOperation* CreateFileSystemOperation( | 70 virtual storage::FileSystemOperation* CreateFileSystemOperation( |
| 71 const storage::FileSystemURL& url, | 71 const storage::FileSystemURL& url, |
| 72 storage::FileSystemContext* context, | 72 storage::FileSystemContext* context, |
| 73 base::File::Error* error_code) const OVERRIDE; | 73 base::File::Error* error_code) const override; |
| 74 virtual bool SupportsStreaming( | 74 virtual bool SupportsStreaming( |
| 75 const storage::FileSystemURL& url) const OVERRIDE; | 75 const storage::FileSystemURL& url) const override; |
| 76 virtual bool HasInplaceCopyImplementation( | 76 virtual bool HasInplaceCopyImplementation( |
| 77 storage::FileSystemType type) const OVERRIDE; | 77 storage::FileSystemType type) const override; |
| 78 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 78 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| 79 const storage::FileSystemURL& url, | 79 const storage::FileSystemURL& url, |
| 80 int64 offset, | 80 int64 offset, |
| 81 int64 max_bytes_to_read, | 81 int64 max_bytes_to_read, |
| 82 const base::Time& expected_modification_time, | 82 const base::Time& expected_modification_time, |
| 83 storage::FileSystemContext* context) const OVERRIDE; | 83 storage::FileSystemContext* context) const override; |
| 84 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | 84 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
| 85 const storage::FileSystemURL& url, | 85 const storage::FileSystemURL& url, |
| 86 int64 offset, | 86 int64 offset, |
| 87 storage::FileSystemContext* context) const OVERRIDE; | 87 storage::FileSystemContext* context) const override; |
| 88 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 88 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() override; |
| 89 virtual const storage::UpdateObserverList* GetUpdateObservers( | 89 virtual const storage::UpdateObserverList* GetUpdateObservers( |
| 90 storage::FileSystemType type) const OVERRIDE; | 90 storage::FileSystemType type) const override; |
| 91 virtual const storage::ChangeObserverList* GetChangeObservers( | 91 virtual const storage::ChangeObserverList* GetChangeObservers( |
| 92 storage::FileSystemType type) const OVERRIDE; | 92 storage::FileSystemType type) const override; |
| 93 virtual const storage::AccessObserverList* GetAccessObservers( | 93 virtual const storage::AccessObserverList* GetAccessObservers( |
| 94 storage::FileSystemType type) const OVERRIDE; | 94 storage::FileSystemType type) const override; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 // Store the profile path. We need this to create temporary snapshot files. | 97 // Store the profile path. We need this to create temporary snapshot files. |
| 98 const base::FilePath profile_path_; | 98 const base::FilePath profile_path_; |
| 99 | 99 |
| 100 scoped_refptr<base::SequencedTaskRunner> media_task_runner_; | 100 scoped_refptr<base::SequencedTaskRunner> media_task_runner_; |
| 101 | 101 |
| 102 scoped_ptr<MediaPathFilter> media_path_filter_; | 102 scoped_ptr<MediaPathFilter> media_path_filter_; |
| 103 scoped_ptr<storage::CopyOrMoveFileValidatorFactory> | 103 scoped_ptr<storage::CopyOrMoveFileValidatorFactory> |
| 104 media_copy_or_move_file_validator_factory_; | 104 media_copy_or_move_file_validator_factory_; |
| 105 | 105 |
| 106 scoped_ptr<storage::AsyncFileUtil> native_media_file_util_; | 106 scoped_ptr<storage::AsyncFileUtil> native_media_file_util_; |
| 107 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; | 107 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; |
| 108 #if defined(OS_WIN) || defined(OS_MACOSX) | 108 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 109 scoped_ptr<storage::AsyncFileUtil> picasa_file_util_; | 109 scoped_ptr<storage::AsyncFileUtil> picasa_file_util_; |
| 110 scoped_ptr<storage::AsyncFileUtil> itunes_file_util_; | 110 scoped_ptr<storage::AsyncFileUtil> itunes_file_util_; |
| 111 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 111 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 112 #if defined(OS_MACOSX) | 112 #if defined(OS_MACOSX) |
| 113 scoped_ptr<storage::AsyncFileUtil> iphoto_file_util_; | 113 scoped_ptr<storage::AsyncFileUtil> iphoto_file_util_; |
| 114 #endif // defined(OS_MACOSX) | 114 #endif // defined(OS_MACOSX) |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemBackend); | 116 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemBackend); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ | 119 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |