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_PICASA_PICASA_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PICASA_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PICASA_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PICASA_FILE_UTIL_H_ |
7 | 7 |
8 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 8 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
9 | 9 |
10 namespace picasa { | 10 namespace picasa { |
11 | 11 |
12 class PicasaDataProvider; | 12 class PicasaDataProvider; |
13 | 13 |
14 extern const char kPicasaDirAlbums[]; | 14 extern const char kPicasaDirAlbums[]; |
15 extern const char kPicasaDirFolders[]; | 15 extern const char kPicasaDirFolders[]; |
16 | 16 |
17 class PicasaFileUtil : public chrome::NativeMediaFileUtil { | 17 class PicasaFileUtil : public chrome::NativeMediaFileUtil { |
18 public: | 18 public: |
19 PicasaFileUtil(); | 19 PicasaFileUtil(); |
20 virtual ~PicasaFileUtil(); | 20 virtual ~PicasaFileUtil(); |
21 | 21 |
22 // Overrides from NativeMediaFileUtil | 22 private: |
23 virtual base::PlatformFileError GetFileInfo( | 23 // TODO(tommycli): Eventually, all of the below methods will have to be |
| 24 // overriding the async public methods instead. |
| 25 // NativeMediaFileUtil overrides. |
| 26 virtual base::PlatformFileError GetFileInfoSync( |
24 fileapi::FileSystemOperationContext* context, | 27 fileapi::FileSystemOperationContext* context, |
25 const fileapi::FileSystemURL& url, | 28 const fileapi::FileSystemURL& url, |
26 base::PlatformFileInfo* file_info, | 29 base::PlatformFileInfo* file_info, |
27 base::FilePath* platform_path) OVERRIDE; | 30 base::FilePath* platform_path) OVERRIDE; |
28 | 31 virtual base::PlatformFileError ReadDirectorySync( |
29 // Paths are enumerated in lexicographical order. | |
30 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( | |
31 fileapi::FileSystemOperationContext* context, | 32 fileapi::FileSystemOperationContext* context, |
32 const fileapi::FileSystemURL& url) OVERRIDE; | 33 const fileapi::FileSystemURL& url, |
33 | 34 EntryList* file_list) OVERRIDE; |
34 virtual base::PlatformFileError GetLocalFilePath( | 35 virtual base::PlatformFileError GetLocalFilePath( |
35 fileapi::FileSystemOperationContext* context, | 36 fileapi::FileSystemOperationContext* context, |
36 const fileapi::FileSystemURL& url, | 37 const fileapi::FileSystemURL& url, |
37 base::FilePath* local_file_path) OVERRIDE; | 38 base::FilePath* local_file_path) OVERRIDE; |
38 | 39 |
39 private: | |
40 virtual PicasaDataProvider* DataProvider(); | 40 virtual PicasaDataProvider* DataProvider(); |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(PicasaFileUtil); | 42 DISALLOW_COPY_AND_ASSIGN(PicasaFileUtil); |
43 }; | 43 }; |
44 | 44 |
45 } // namespace picasa | 45 } // namespace picasa |
46 | 46 |
47 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PICASA_FILE_UTIL_H_ | 47 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PICASA_FILE_UTIL_H_ |
OLD | NEW |