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_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ |
7 | 7 |
| 8 #include "base/memory/weak_ptr.h" |
8 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 9 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
9 | 10 |
10 namespace itunes { | 11 namespace itunes { |
11 | 12 |
| 13 class ITunesDataProvider; |
| 14 |
12 class ItunesFileUtil : public chrome::NativeMediaFileUtil { | 15 class ItunesFileUtil : public chrome::NativeMediaFileUtil { |
13 public: | 16 public: |
14 ItunesFileUtil(); | 17 ItunesFileUtil(); |
15 virtual ~ItunesFileUtil(); | 18 virtual ~ItunesFileUtil(); |
16 | 19 |
17 private: | 20 protected: |
18 // NativeMediaFileUtil overrides. | 21 // NativeMediaFileUtil overrides. |
| 22 virtual void GetFileInfoOnTaskRunnerThread( |
| 23 fileapi::FileSystemOperationContext* context, |
| 24 const fileapi::FileSystemURL& url, |
| 25 const GetFileInfoCallback& callback) OVERRIDE; |
| 26 virtual void ReadDirectoryOnTaskRunnerThread( |
| 27 fileapi::FileSystemOperationContext* context, |
| 28 const fileapi::FileSystemURL& url, |
| 29 const ReadDirectoryCallback& callback) OVERRIDE; |
19 virtual base::PlatformFileError GetFileInfoSync( | 30 virtual base::PlatformFileError GetFileInfoSync( |
20 fileapi::FileSystemOperationContext* context, | 31 fileapi::FileSystemOperationContext* context, |
21 const fileapi::FileSystemURL& url, | 32 const fileapi::FileSystemURL& url, |
22 base::PlatformFileInfo* file_info, | 33 base::PlatformFileInfo* file_info, |
23 base::FilePath* platform_path) OVERRIDE; | 34 base::FilePath* platform_path) OVERRIDE; |
24 virtual base::PlatformFileError ReadDirectorySync( | 35 virtual base::PlatformFileError ReadDirectorySync( |
25 fileapi::FileSystemOperationContext* context, | 36 fileapi::FileSystemOperationContext* context, |
26 const fileapi::FileSystemURL& url, | 37 const fileapi::FileSystemURL& url, |
27 EntryList* file_list) OVERRIDE; | 38 EntryList* file_list) OVERRIDE; |
28 virtual base::PlatformFileError GetLocalFilePath( | 39 virtual base::PlatformFileError GetLocalFilePath( |
29 fileapi::FileSystemOperationContext* context, | 40 fileapi::FileSystemOperationContext* context, |
30 const fileapi::FileSystemURL& url, | 41 const fileapi::FileSystemURL& url, |
31 base::FilePath* local_file_path) OVERRIDE; | 42 base::FilePath* local_file_path) OVERRIDE; |
32 | 43 |
33 private: | 44 private: |
| 45 void GetFileInfoWithFreshDataProvider( |
| 46 fileapi::FileSystemOperationContext* context, |
| 47 const fileapi::FileSystemURL& url, |
| 48 const GetFileInfoCallback& callback); |
| 49 void ReadDirectoryWithFreshDataProvider( |
| 50 fileapi::FileSystemOperationContext* context, |
| 51 const fileapi::FileSystemURL& url, |
| 52 const ReadDirectoryCallback& callback); |
| 53 |
| 54 ITunesDataProvider* GetDataProvider(); |
| 55 |
| 56 base::WeakPtrFactory<ItunesFileUtil> weak_factory_; |
| 57 |
34 DISALLOW_COPY_AND_ASSIGN(ItunesFileUtil); | 58 DISALLOW_COPY_AND_ASSIGN(ItunesFileUtil); |
35 }; | 59 }; |
36 | 60 |
37 } // namespace itunes | 61 } // namespace itunes |
38 | 62 |
39 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ | 63 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_ITUNES_FILE_UTIL_H_ |
40 | 64 |
OLD | NEW |