OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ |
6 #define CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ | 6 #define CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 | 13 |
14 class DictionaryValue; | 14 class DictionaryValue; |
15 class GURL; | 15 class GURL; |
16 class TemplateURL; | 16 class TemplateURL; |
17 | 17 |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 // Detects which version of Firefox is installed from registry. Returns its | 19 // Detects which version of Firefox is installed from registry. Returns its |
20 // major version, and drops the minor version. Returns 0 if | 20 // major version, and drops the minor version. Returns 0 if |
21 // failed. If there are indicators of both FF2 and FF3 it is | 21 // failed. If there are indicators of both FF2 and FF3 it is |
22 // biased to return the biggest version. | 22 // biased to return the biggest version. |
23 int GetCurrentFirefoxMajorVersionFromRegistry(); | 23 int GetCurrentFirefoxMajorVersionFromRegistry(); |
24 | 24 |
25 // Detects where Firefox lives. Returns a empty string if Firefox | 25 // Detects where Firefox lives. Returns a empty string if Firefox |
26 // is not installed. | 26 // is not installed. |
27 std::wstring GetFirefoxInstallPathFromRegistry(); | 27 std::wstring GetFirefoxInstallPathFromRegistry(); |
28 #endif | 28 #endif // OS_WIN |
29 | |
30 #if defined(OS_MACOSX) | |
31 | |
32 // Get the directory in which the Firefox .dylibs live, we need to load these | |
33 // in order to decoded FF profile passwords. | |
34 // The Path is usuall FF App Bundle/Contents/Mac OS/ | |
35 bool GetFirefoxDylibPath(FilePath *ff_dylib_dir); | |
John Grabowski
2009/08/21 01:13:18
Why return bool and not return FilePath?
FilePath:
| |
36 #endif // OS_MACOSX | |
29 | 37 |
30 // Detects version of Firefox and installation path from given Firefox profile | 38 // Detects version of Firefox and installation path from given Firefox profile |
31 bool GetFirefoxVersionAndPathFromProfile(const std::wstring& profile_path, | 39 bool GetFirefoxVersionAndPathFromProfile(const std::wstring& profile_path, |
32 int* version, | 40 int* version, |
33 std::wstring* app_path); | 41 std::wstring* app_path); |
34 | 42 |
35 // Gets the full path of the profiles.ini file. This file records | 43 // Gets the full path of the profiles.ini file. This file records |
36 // the profiles that can be used by Firefox. Returns an empty | 44 // the profiles that can be used by Firefox. Returns an empty |
37 // string if failed. | 45 // string if failed. |
38 FilePath GetProfilesINI(); | 46 FilePath GetProfilesINI(); |
(...skipping 30 matching lines...) Expand all Loading... | |
69 // Returns the home page set in Firefox in a particular profile. | 77 // Returns the home page set in Firefox in a particular profile. |
70 GURL GetHomepage(const std::wstring& profile_path); | 78 GURL GetHomepage(const std::wstring& profile_path); |
71 | 79 |
72 // Checks to see if this home page is a default home page, as specified by | 80 // Checks to see if this home page is a default home page, as specified by |
73 // the resource file browserconfig.properties in the Firefox application | 81 // the resource file browserconfig.properties in the Firefox application |
74 // directory. | 82 // directory. |
75 bool IsDefaultHomepage(const GURL& homepage, const std::wstring& app_path); | 83 bool IsDefaultHomepage(const GURL& homepage, const std::wstring& app_path); |
76 | 84 |
77 | 85 |
78 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ | 86 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ |
OLD | NEW |