OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "base/path_service.h" | 36 #include "base/path_service.h" |
37 #include "base/win/iat_patch_function.h" | 37 #include "base/win/iat_patch_function.h" |
38 #include "base/win/scoped_handle.h" | 38 #include "base/win/scoped_handle.h" |
39 #include "chrome/common/chrome_paths.h" | 39 #include "chrome/common/chrome_paths.h" |
40 #include "chrome/utility/itunes_pref_parser_win.h" | 40 #include "chrome/utility/itunes_pref_parser_win.h" |
41 #include "printing/emf_win.h" | 41 #include "printing/emf_win.h" |
42 #include "ui/gfx/gdi_util.h" | 42 #include "ui/gfx/gdi_util.h" |
43 #endif // defined(OS_WIN) | 43 #endif // defined(OS_WIN) |
44 | 44 |
45 #if defined(OS_WIN) || defined(OS_MACOSX) | 45 #if defined(OS_WIN) || defined(OS_MACOSX) |
46 #include "chrome/common/media_galleries/picasa_types.h" | |
47 #include "chrome/utility/itunes_library_parser.h" | 46 #include "chrome/utility/itunes_library_parser.h" |
48 #include "chrome/utility/media_galleries/picasa_album_table_reader.h" | 47 #include "chrome/utility/media_galleries/picasa_album_table_reader.h" |
| 48 #include "chrome/utility/media_galleries/picasa_albums_indexer.h" |
49 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 49 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
50 | 50 |
51 #if defined(ENABLE_PRINTING) | 51 #if defined(ENABLE_PRINTING) |
52 #include "chrome/common/child_process_logging.h" | 52 #include "chrome/common/child_process_logging.h" |
53 #include "printing/backend/print_backend.h" | 53 #include "printing/backend/print_backend.h" |
54 #endif | 54 #endif |
55 | 55 |
56 #if defined(ENABLE_MDNS) | 56 #if defined(ENABLE_MDNS) |
57 #include "chrome/utility/local_discovery/service_discovery_message_handler.h" | 57 #include "chrome/utility/local_discovery/service_discovery_message_handler.h" |
58 #endif // ENABLE_MDNS | 58 #endif // ENABLE_MDNS |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 album_table_files.uid_file); | 555 album_table_files.uid_file); |
556 | 556 |
557 picasa::PicasaAlbumTableReader reader(files); | 557 picasa::PicasaAlbumTableReader reader(files); |
558 bool parse_success = reader.Init(); | 558 bool parse_success = reader.Init(); |
559 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( | 559 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( |
560 parse_success, | 560 parse_success, |
561 reader.albums(), | 561 reader.albums(), |
562 reader.folders())); | 562 reader.folders())); |
563 ReleaseProcessIfNeeded(); | 563 ReleaseProcessIfNeeded(); |
564 } | 564 } |
| 565 |
| 566 void OnIndexPicasaAlbumsContents( |
| 567 const picasa::AlbumUIDSet& album_uids, |
| 568 const std::vector<picasa::FolderINIContents>& folders_inis) { |
| 569 picasa::PicasaAlbumsIndexer indexer(album_uids); |
| 570 for (std::vector<picasa::FolderINIContents>::const_iterator it = |
| 571 folders_inis.begin(); |
| 572 it != folders_inis.end(); ++it) { |
| 573 indexer.ParseFolderINI(it->folder_path, it->ini_contents); |
| 574 } |
| 575 |
| 576 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( |
| 577 indexer.albums_images())); |
| 578 ReleaseProcessIfNeeded(); |
| 579 } |
565 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 580 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
566 | 581 |
567 } // namespace chrome | 582 } // namespace chrome |
OLD | NEW |