Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_ALBUM_TABLE_READER_H_ | |
| 6 #define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_ALBUM_TABLE_READER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/files/file_path.h" | |
| 10 #include "base/time.h" | |
| 11 #include "webkit/storage/webkit_storage_export.h" | |
| 12 | |
| 13 namespace picasaimport { | |
| 14 | |
| 15 struct AlbumInfo { | |
| 16 AlbumInfo(const std::string& name, const base::Time& timestamp, | |
| 17 const std::string& uid); | |
| 18 | |
| 19 std::string name; | |
| 20 base::Time timestamp; | |
| 21 std::string uid; | |
| 22 }; | |
| 23 | |
| 24 struct FolderInfo { | |
| 25 FolderInfo(const std::string& name, const base::Time& timestamp, | |
| 26 const base::FilePath& path); | |
| 27 | |
| 28 std::string name; | |
| 29 base::Time timestamp; | |
| 30 base::FilePath path; | |
| 31 }; | |
| 32 | |
| 33 class WEBKIT_STORAGE_EXPORT_PRIVATE PicasaAlbumTableReader { | |
| 34 public: | |
| 35 PicasaAlbumTableReader(); | |
|
Greg Billock
2013/04/11 23:12:44
Any reason this can't take the path argument and g
tommycli
2013/04/12 20:47:44
Callers need to know when it explicitly failed, an
| |
| 36 virtual ~PicasaAlbumTableReader(); | |
| 37 | |
| 38 virtual bool Init(const base::FilePath& directory_path); | |
|
Greg Billock
2013/04/11 23:12:44
Is this path like the path to a metadata file or s
tommycli
2013/04/12 20:47:44
Done.
| |
| 39 | |
| 40 std::vector<FolderInfo> folders() { | |
|
Greg Billock
2013/04/11 23:12:44
Do you want to return const & here and below? Or r
tommycli
2013/04/12 20:47:44
Done.
| |
| 41 return folders_; | |
| 42 } | |
| 43 | |
| 44 std::vector<AlbumInfo> user_albums() { | |
| 45 return user_albums_; | |
| 46 } | |
| 47 | |
| 48 private: | |
| 49 std::vector<FolderInfo> folders_; | |
| 50 std::vector<AlbumInfo> user_albums_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN (PicasaAlbumTableReader); | |
| 53 }; | |
| 54 | |
| 55 } // namespace picasaimport | |
| 56 | |
| 57 #endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_ALBUM_TABLE_READER_H_ | |
| OLD | NEW |