Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / media_galleries / fileapi / iapps_finder_impl.h
blob7e9f955dfaf0a5909fe4d80ee81bd48d26752da1
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IAPPS_FINDER_IMPL_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IAPPS_FINDER_IMPL_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/files/file_path.h"
12 #include "chrome/browser/media_galleries/fileapi/iapps_finder.h"
13 #include "components/storage_monitor/storage_info.h"
15 #if defined(OS_MACOSX)
17 class MacPreferences;
18 #if defined(__OBJC__)
19 @class NSArray;
20 @class NSString;
21 #else // __OBJC__
22 class NSArray;
23 class NSString;
24 #endif // __OBJC__
26 #endif // OS_MACOSX
28 namespace iapps {
30 #if defined(OS_MACOSX)
32 extern NSString* const kIPhotoRecentDatabasesKey;
33 extern NSString* const kITunesRecentDatabasePathsKey;
35 // Set the mac preferences to use for testing. The caller continues to own
36 // |preferences| and should call this function again with NULL before freeing
37 // it.
38 void SetMacPreferencesForTesting(MacPreferences* preferences);
40 // Returns an NSArray with a single string entry which is a path value.
41 NSArray* NSArrayFromFilePath(const base::FilePath& path);
43 #endif // OS_MACOSX
45 typedef base::Callback<void(const IAppsFinderCallback&)> IAppsFinderTask;
47 // FindIAppsOnFileThread helps iApps finders by taking care of the details of
48 // bouncing to the FILE thread to run |task| and then turning the result into a
49 // device id and posting it to |callback| on the UI thread. If |task| does not
50 // find the iApps's library, |callback| gets an empty string.
51 void FindIAppsOnFileThread(storage_monitor::StorageInfo::Type type,
52 const IAppsFinderTask& task,
53 const IAppsFinderCallback& callback);
55 } // namespace iapps
57 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IAPPS_FINDER_IMPL_H_