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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 18562007: Media Galleries API Picasa: Put INI indexing step into sandboxed utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0035-picasa-import-sandbox-pmp-reading
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/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index a3d7b8f5db9938519f5c12f32a5589ef16f1bb50..af0b9a921b68fc26276731ea5eb909510166bbd9 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -42,9 +42,9 @@
#endif // defined(OS_WIN)
#if defined(OS_WIN) || defined(OS_MACOSX)
-#include "chrome/common/media_galleries/picasa_types.h"
#include "chrome/utility/itunes_library_parser.h"
#include "chrome/utility/media_galleries/picasa_album_table_reader.h"
+#include "chrome/utility/media_galleries/picasa_albums_indexer.h"
#endif // defined(OS_WIN) || defined(OS_MACOSX)
#if defined(ENABLE_PRINTING)
@@ -547,6 +547,21 @@ void ChromeContentUtilityClient::OnParsePicasaPMPDatabase(
reader.folders()));
ReleaseProcessIfNeeded();
}
+
+void OnIndexPicasaAlbumsContents(
+ const picasa::AlbumUIDSet& album_uids,
+ const std::vector<picasa::FolderINIContents>& folders_inis) {
+ picasa::PicasaAlbumsIndexer indexer(album_uids);
+ for (std::vector<picasa::FolderINIContents>::const_iterator it =
+ folders_inis.begin();
+ it != folders_inis.end(); ++it) {
+ indexer.ParseFolderINI(it->folder_path, it->ini_contents);
+ }
+
+ Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished(
+ indexer.albums_images()));
+ ReleaseProcessIfNeeded();
+}
#endif // defined(OS_WIN) || defined(OS_MACOSX)
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698