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

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: Add album name dedupe 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
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 #include "base/time/time.h"
15 16
16 namespace iphoto { 17 namespace iphoto {
17 namespace parser { 18 namespace parser {
18 19
19 struct Photo { 20 struct Photo {
20 Photo(); 21 Photo();
21 Photo(uint64 id, const base::FilePath& location); 22 Photo(uint64 id,
23 const base::FilePath& location,
24 const base::FilePath& original_location,
25 const base::Time& photo_time);
22 bool operator<(const Photo& other) const; 26 bool operator<(const Photo& other) const;
23 27
24 uint64 id; 28 uint64 id;
25 base::FilePath location; 29 base::FilePath location;
30 base::FilePath original_location;
31 base::Time photo_time;
26 }; 32 };
27 33
28 typedef std::set<uint64> Album; 34 typedef std::set<uint64> Album;
29 typedef std::map<std::string /*album name*/, Album> Albums; 35 typedef std::map<std::string /*album name*/, Album> Albums;
30 36
31 struct Library { 37 struct Library {
32 Library(); 38 Library();
33 Library(const Albums& albums, const std::set<Photo>& all_photos); 39 Library(const Albums& albums, const std::set<Photo>& all_photos);
34 ~Library(); 40 ~Library();
35 41
36 Albums albums; 42 Albums albums;
37 std::set<Photo> all_photos; 43 std::set<Photo> all_photos;
38 }; 44 };
39 45
40 } // namespace parser 46 } // namespace parser
41 } // namespace iphoto 47 } // namespace iphoto
42 48
43 #endif // CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_ 49 #endif // CHROME_COMMON_MEDIA_GALLERIES_IPHOTO_LIBRARY_H_
44 50
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698