Chromium Code Reviews| 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 |
| 18 | |
|
vandebo (ex-Chrome)
2014/01/06 18:45:03
nit: extra line.
Greg Billock
2014/01/07 16:50:55
Done.
| |
| 17 using base::mac::CFCast; | 19 using base::mac::CFCast; |
| 18 using base::mac::CFToNSCast; | 20 using base::mac::CFToNSCast; |
| 19 using base::mac::NSToCFCast; | 21 using base::mac::NSToCFCast; |
| 20 | 22 |
| 21 namespace iapps { | 23 namespace iapps { |
| 22 | 24 |
| 23 namespace { | 25 namespace { |
| 24 | 26 |
| 25 typedef base::Callback<base::FilePath(NSString*)> PListPathExtractor; | 27 typedef base::Callback<base::FilePath(NSString*)> PListPathExtractor; |
| 26 | 28 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 base::Bind(&FindMostRecentDatabase, | 107 base::Bind(&FindMostRecentDatabase, |
| 106 base::scoped_nsobject<NSString>(kITunesRecentDatabasePathsKey), | 108 base::scoped_nsobject<NSString>(kITunesRecentDatabasePathsKey), |
| 107 base::Bind(&ExtractITunesPath)), | 109 base::Bind(&ExtractITunesPath)), |
| 108 callback); | 110 callback); |
| 109 } | 111 } |
| 110 | 112 |
| 111 void SetMacPreferencesForTesting(MacPreferences* preferences) { | 113 void SetMacPreferencesForTesting(MacPreferences* preferences) { |
| 112 g_test_mac_preferences = preferences; | 114 g_test_mac_preferences = preferences; |
| 113 } | 115 } |
| 114 | 116 |
| 117 NSArray* NSArrayFromFilePath(const base::FilePath& path) { | |
| 118 NSString* url = | |
| 119 [[NSURL fileURLWithPath:base::SysUTF8ToNSString(path.value())] | |
| 120 absoluteString]; | |
| 121 return [NSArray arrayWithObject:url]; | |
| 122 } | |
| 123 | |
| 115 } // namespace iapps | 124 } // namespace iapps |
| OLD | NEW |