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_FILE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" | 10 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // - /albums/albumname 2013-08-21/ | 21 // - /albums/albumname 2013-08-21/ |
22 // - /albums/albumname 2013-08-21/imagename.jpg | 22 // - /albums/albumname 2013-08-21/imagename.jpg |
23 // - /albums/duplicatename 2013-08-21/ | 23 // - /albums/duplicatename 2013-08-21/ |
24 // - /albums/duplicatename 2013-08-21 (1)/ | 24 // - /albums/duplicatename 2013-08-21 (1)/ |
25 // - /folders/ | 25 // - /folders/ |
26 // - /folders/My Pictures 2013-08-21/flower.jpg | 26 // - /folders/My Pictures 2013-08-21/flower.jpg |
27 // - /folders/Photos 2013-08-21/ | 27 // - /folders/Photos 2013-08-21/ |
28 class PicasaFileUtil : public NativeMediaFileUtil { | 28 class PicasaFileUtil : public NativeMediaFileUtil { |
29 public: | 29 public: |
30 explicit PicasaFileUtil(MediaPathFilter* media_path_filter); | 30 explicit PicasaFileUtil(MediaPathFilter* media_path_filter); |
31 virtual ~PicasaFileUtil(); | 31 ~PicasaFileUtil() override; |
32 | 32 |
33 protected: | 33 protected: |
34 // NativeMediaFileUtil overrides. | 34 // NativeMediaFileUtil overrides. |
35 virtual void GetFileInfoOnTaskRunnerThread( | 35 void GetFileInfoOnTaskRunnerThread( |
36 scoped_ptr<storage::FileSystemOperationContext> context, | 36 scoped_ptr<storage::FileSystemOperationContext> context, |
37 const storage::FileSystemURL& url, | 37 const storage::FileSystemURL& url, |
38 const GetFileInfoCallback& callback) override; | 38 const GetFileInfoCallback& callback) override; |
39 virtual void ReadDirectoryOnTaskRunnerThread( | 39 void ReadDirectoryOnTaskRunnerThread( |
40 scoped_ptr<storage::FileSystemOperationContext> context, | 40 scoped_ptr<storage::FileSystemOperationContext> context, |
41 const storage::FileSystemURL& url, | 41 const storage::FileSystemURL& url, |
42 const ReadDirectoryCallback& callback) override; | 42 const ReadDirectoryCallback& callback) override; |
43 virtual base::File::Error GetFileInfoSync( | 43 base::File::Error GetFileInfoSync( |
44 storage::FileSystemOperationContext* context, | 44 storage::FileSystemOperationContext* context, |
45 const storage::FileSystemURL& url, | 45 const storage::FileSystemURL& url, |
46 base::File::Info* file_info, | 46 base::File::Info* file_info, |
47 base::FilePath* platform_path) override; | 47 base::FilePath* platform_path) override; |
48 virtual base::File::Error ReadDirectorySync( | 48 base::File::Error ReadDirectorySync( |
49 storage::FileSystemOperationContext* context, | 49 storage::FileSystemOperationContext* context, |
50 const storage::FileSystemURL& url, | 50 const storage::FileSystemURL& url, |
51 EntryList* file_list) override; | 51 EntryList* file_list) override; |
52 virtual base::File::Error DeleteDirectorySync( | 52 base::File::Error DeleteDirectorySync( |
53 storage::FileSystemOperationContext* context, | 53 storage::FileSystemOperationContext* context, |
54 const storage::FileSystemURL& url) override; | 54 const storage::FileSystemURL& url) override; |
55 virtual base::File::Error DeleteFileSync( | 55 base::File::Error DeleteFileSync(storage::FileSystemOperationContext* context, |
56 storage::FileSystemOperationContext* context, | 56 const storage::FileSystemURL& url) override; |
57 const storage::FileSystemURL& url) override; | 57 base::File::Error GetLocalFilePath( |
58 virtual base::File::Error GetLocalFilePath( | |
59 storage::FileSystemOperationContext* context, | 58 storage::FileSystemOperationContext* context, |
60 const storage::FileSystemURL& url, | 59 const storage::FileSystemURL& url, |
61 base::FilePath* local_file_path) override; | 60 base::FilePath* local_file_path) override; |
62 | 61 |
63 private: | 62 private: |
64 void GetFileInfoWithFreshDataProvider( | 63 void GetFileInfoWithFreshDataProvider( |
65 scoped_ptr<storage::FileSystemOperationContext> context, | 64 scoped_ptr<storage::FileSystemOperationContext> context, |
66 const storage::FileSystemURL& url, | 65 const storage::FileSystemURL& url, |
67 const GetFileInfoCallback& callback, | 66 const GetFileInfoCallback& callback, |
68 bool success); | 67 bool success); |
69 void ReadDirectoryWithFreshDataProvider( | 68 void ReadDirectoryWithFreshDataProvider( |
70 scoped_ptr<storage::FileSystemOperationContext> context, | 69 scoped_ptr<storage::FileSystemOperationContext> context, |
71 const storage::FileSystemURL& url, | 70 const storage::FileSystemURL& url, |
72 const ReadDirectoryCallback& callback, | 71 const ReadDirectoryCallback& callback, |
73 bool success); | 72 bool success); |
74 | 73 |
75 virtual PicasaDataProvider* GetDataProvider(); | 74 virtual PicasaDataProvider* GetDataProvider(); |
76 | 75 |
77 base::WeakPtrFactory<PicasaFileUtil> weak_factory_; | 76 base::WeakPtrFactory<PicasaFileUtil> weak_factory_; |
78 | 77 |
79 DISALLOW_COPY_AND_ASSIGN(PicasaFileUtil); | 78 DISALLOW_COPY_AND_ASSIGN(PicasaFileUtil); |
80 }; | 79 }; |
81 | 80 |
82 } // namespace picasa | 81 } // namespace picasa |
83 | 82 |
84 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ | 83 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ |
OLD | NEW |