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_
10 #include "base/callback.h"
11 #include "base/files/file_path.h"
13 #if defined(OS_MACOSX)
27 extern const wchar_t kPicasaRegistryPath
[];
28 extern const wchar_t kPicasaRegistryAppDataPathKey
[];
31 #if defined(OS_MACOSX)
32 extern NSString
* const kPicasaAppDataPathMacPreferencesKey
;
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
52 void SetMacPreferencesForTesting(MacPreferences
* preferences
);
54 // Used internally only.
55 base::FilePath
GetCustomPicasaAppDataPathFromMacPreferences();
60 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FINDER_H_