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 #include "chrome/browser/media_galleries/fileapi/iapps_finder_impl.h" | 5 #include "chrome/browser/media_galleries/fileapi/iapps_finder_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #import "base/mac/foundation_util.h" | 10 #import "base/mac/foundation_util.h" |
11 #import "base/mac/scoped_nsobject.h" | 11 #import "base/mac/scoped_nsobject.h" |
| 12 #include "base/strings/sys_string_conversions.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "chrome/browser/storage_monitor/storage_info.h" | 14 #include "chrome/browser/storage_monitor/storage_info.h" |
14 #include "components/policy/core/common/preferences_mac.h" | 15 #include "components/policy/core/common/preferences_mac.h" |
15 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
16 | 17 |
17 using base::mac::CFCast; | 18 using base::mac::CFCast; |
18 using base::mac::CFToNSCast; | 19 using base::mac::CFToNSCast; |
19 using base::mac::NSToCFCast; | 20 using base::mac::NSToCFCast; |
20 | 21 |
21 namespace iapps { | 22 namespace iapps { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 base::Bind(&FindMostRecentDatabase, | 106 base::Bind(&FindMostRecentDatabase, |
106 base::scoped_nsobject<NSString>(kITunesRecentDatabasePathsKey), | 107 base::scoped_nsobject<NSString>(kITunesRecentDatabasePathsKey), |
107 base::Bind(&ExtractITunesPath)), | 108 base::Bind(&ExtractITunesPath)), |
108 callback); | 109 callback); |
109 } | 110 } |
110 | 111 |
111 void SetMacPreferencesForTesting(MacPreferences* preferences) { | 112 void SetMacPreferencesForTesting(MacPreferences* preferences) { |
112 g_test_mac_preferences = preferences; | 113 g_test_mac_preferences = preferences; |
113 } | 114 } |
114 | 115 |
| 116 NSArray* NSArrayFromFilePath(const base::FilePath& path) { |
| 117 NSString* url = |
| 118 [[NSURL fileURLWithPath:base::SysUTF8ToNSString(path.value())] |
| 119 absoluteString]; |
| 120 return [NSArray arrayWithObject:url]; |
| 121 } |
| 122 |
115 } // namespace iapps | 123 } // namespace iapps |
OLD | NEW |