OLD | NEW |
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 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_ITUNES_LIBRARY_PARSER_H_ | 5 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_ITUNES_LIBRARY_PARSER_H_ |
6 #define CHROME_UTILITY_MEDIA_GALLERIES_ITUNES_LIBRARY_PARSER_H_ | 6 #define CHROME_UTILITY_MEDIA_GALLERIES_ITUNES_LIBRARY_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/macros.h" |
10 #include "chrome/common/media_galleries/itunes_library.h" | 11 #include "chrome/common/media_galleries/itunes_library.h" |
11 | 12 |
12 namespace itunes { | 13 namespace itunes { |
13 | 14 |
14 class ITunesLibraryParser { | 15 class ITunesLibraryParser { |
15 public: | 16 public: |
16 ITunesLibraryParser(); | 17 ITunesLibraryParser(); |
17 ~ITunesLibraryParser(); | 18 ~ITunesLibraryParser(); |
18 | 19 |
19 // Returns true if at least one track was found. Malformed track entries | 20 // Returns true if at least one track was found. Malformed track entries |
20 // are silently ignored. | 21 // are silently ignored. |
21 bool Parse(const std::string& xml); | 22 bool Parse(const std::string& xml); |
22 | 23 |
23 const parser::Library& library() { return library_; } | 24 const parser::Library& library() { return library_; } |
24 | 25 |
25 private: | 26 private: |
26 parser::Library library_; | 27 parser::Library library_; |
27 | 28 |
28 DISALLOW_COPY_AND_ASSIGN(ITunesLibraryParser); | 29 DISALLOW_COPY_AND_ASSIGN(ITunesLibraryParser); |
29 }; | 30 }; |
30 | 31 |
31 } // namespace itunes | 32 } // namespace itunes |
32 | 33 |
33 #endif // CHROME_UTILITY_MEDIA_GALLERIES_ITUNES_LIBRARY_PARSER_H_ | 34 #endif // CHROME_UTILITY_MEDIA_GALLERIES_ITUNES_LIBRARY_PARSER_H_ |
OLD | NEW |