Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1679)

Unified Diff: chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.cc

Issue 17101030: Media Galleries API - Picasa: Change PMP Parsing to deal with PlatformFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.cc
diff --git a/chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.cc b/chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.cc
index cdeec7644ccd86386fed6d54ef875e19894b3fbd..3779455628a770e7a959a9acb12a8053e5475f0b 100644
--- a/chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.cc
+++ b/chrome/browser/media_galleries/fileapi/picasa/picasa_data_provider.cc
@@ -89,15 +89,17 @@ void PicasaDataProvider::UniquifyNames(const std::vector<AlbumInfo>& info_list,
}
bool PicasaDataProvider::ReadData() {
- PicasaAlbumTableReader album_table_reader(database_path_);
+ PicasaAlbumTableFiles album_table_files(database_path_);
+ PicasaAlbumTableReader album_table_reader((album_table_files));
- if (!album_table_reader.Init())
- return false;
+ bool read_success = album_table_reader.Init();
- InitializeWith(album_table_reader.albums(),
- album_table_reader.folders());
+ ClosePicasaAlbumTableFiles(&album_table_files);
- return true;
+ if (read_success)
+ InitializeWith(album_table_reader.albums(), album_table_reader.folders());
+
+ return read_success;
}
} // namespace picasa

Powered by Google App Engine
This is Rietveld 408576698