Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / media_galleries / fileapi / picasa_finder.h
blob109c90d62157266e48fc66ed926f02e57eb4bffa
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_PICASA_FINDER_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FINDER_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/files/file_path.h"
13 #if defined(OS_MACOSX)
15 class MacPreferences;
16 #if defined(__OBJC__)
17 @class NSString;
18 #else // __OBJC__
19 class NSString;
20 #endif // __OBJC__
22 #endif // OS_MACOSX
24 namespace picasa {
26 #if defined(OS_WIN)
27 extern const wchar_t kPicasaRegistryPath[];
28 extern const wchar_t kPicasaRegistryAppDataPathKey[];
29 #endif
31 #if defined(OS_MACOSX)
32 extern NSString* const kPicasaAppDataPathMacPreferencesKey;
33 #endif
35 typedef base::Callback<void(const std::string&)> DeviceIDCallback;
37 // Bounces to FILE thread to find Picasa database. If the platform supports
38 // Picasa and a Picasa database is found, |callback| will be invoked on the
39 // calling thread with the device ID. Otherwise, |callback| will be invoked
40 // with an empty string.
41 void FindPicasaDatabase(const DeviceIDCallback& callback);
43 // Builds the OS-dependent Picasa database path from the app-data path.
44 // Used internally and by tests to construct an test environments.
45 base::FilePath MakePicasaDatabasePath(
46 const base::FilePath& picasa_app_data_path);
48 #if defined(OS_MACOSX)
49 // Set the mac preferences to use for testing. The caller continues to own
50 // |preferences| and should call this function again with NULL before freeing
51 // it.
52 void SetMacPreferencesForTesting(MacPreferences* preferences);
54 // Used internally only.
55 base::FilePath GetCustomPicasaAppDataPathFromMacPreferences();
56 #endif // OS_MACOSX
58 } // namespace picasa
60 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FINDER_H_