OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/media_galleries/fileapi/itunes_finder_win.h" | 5 #include "chrome/browser/media_galleries/fileapi/itunes_finder_win.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/base_paths_win.h" | 10 #include "base/base_paths_win.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/media_galleries/fileapi/itunes_xml_utils.h" | 17 #include "chrome/browser/media_galleries/fileapi/itunes_xml_utils.h" |
18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
19 #include "third_party/libxml/chromium/libxml_utils.h" | 19 #include "third_party/libxml/chromium/libxml_utils.h" |
20 | 20 |
21 namespace itunes { | 21 namespace itunes { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Read the iTunes preferences from |pref_file| and then try to extract the | 25 // Read the iTunes preferences from |pref_file| and then try to extract the |
26 // library XML location from the XML file. Return it if found. The minimal | 26 // library XML location from the XML file. Return it if found. The minimal |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 if (library_file.empty()) { | 128 if (library_file.empty()) { |
129 PostResultToUIThread(std::string()); | 129 PostResultToUIThread(std::string()); |
130 return; | 130 return; |
131 } | 131 } |
132 | 132 |
133 PostResultToUIThread(library_file.AsUTF8Unsafe()); | 133 PostResultToUIThread(library_file.AsUTF8Unsafe()); |
134 } | 134 } |
135 | 135 |
136 } // namespace itunes | 136 } // namespace itunes |
OLD | NEW |