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

Side by Side Diff: chrome/common/media_galleries/iphoto_library.h

Issue 52093003: [MediaGalleries] iPhoto: Add original file field to the parser. Dedupe album names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/media_galleries/iphoto_library.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // These data structures can be used to describe the contents of an iPhoto 5 // These data structures can be used to describe the contents of an iPhoto
6 // library. 6 // library.
7 7
8 #ifndef CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ 8 #ifndef CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_
9 #define CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ 9 #define CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_
10 10
11 #include <map> 11 #include <map>
12 #include <set> 12 #include <set>
13 13
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 15
16 namespace iphoto { 16 namespace iphoto {
17 namespace parser { 17 namespace parser {
18 18
19 struct Photo { 19 struct Photo {
20 Photo(); 20 Photo();
21 Photo(uint64 id, const base::FilePath& location); 21 Photo(uint64 id,
22 const base::FilePath& location,
23 const base::FilePath& original_location);
22 bool operator<(const Photo& other) const; 24 bool operator<(const Photo& other) const;
23 25
24 uint64 id; 26 uint64 id;
25 base::FilePath location; 27 base::FilePath location;
28 base::FilePath original_location;
26 }; 29 };
27 30
28 typedef std::set<uint64> Album; 31 typedef std::set<uint64> Album;
29 typedef std::map<std::string /*album name*/, Album> Albums; 32 typedef std::map<std::string /*album name*/, Album> Albums;
30 33
31 struct Library { 34 struct Library {
32 Library(); 35 Library();
33 Library(const Albums& albums, const std::set<Photo>& all_photos); 36 Library(const Albums& albums, const std::set<Photo>& all_photos);
34 ~Library(); 37 ~Library();
35 38
36 Albums albums; 39 Albums albums;
37 std::set<Photo> all_photos; 40 std::set<Photo> all_photos;
38 }; 41 };
39 42
40 } // namespace parser 43 } // namespace parser
41 } // namespace iphoto 44 } // namespace iphoto
42 45
43 #endif // CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ 46 #endif // CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_
44 47
OLDNEW
« no previous file with comments | « no previous file | chrome/common/media_galleries/iphoto_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698