Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/importer/firefox_importer_utils.h

Issue 27249: Make firefox_importer_utils.cc compile on Posix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser.scons ('k') | chrome/browser/importer/firefox_importer_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/basictypes.h"
8 #include "base/values.h" 9 #include "base/values.h"
9 #include "build/build_config.h" 10 #include "build/build_config.h"
10 #include "webkit/glue/password_form.h" 11 #include "webkit/glue/password_form.h"
11 12
12 class GURL; 13 class GURL;
13 class TemplateURL; 14 class TemplateURL;
14 15
15 // Detects which version of Firefox is installed. Returns its 16 // Detects which version of Firefox is installed. Returns its
16 // major version, and drops the minor version. Returns 0 if 17 // major version, and drops the minor version. Returns 0 if
17 // failed. If there are indicators of both FF2 and FF3 it is 18 // failed. If there are indicators of both FF2 and FF3 it is
18 // biased to return the biggest version. 19 // biased to return the biggest version.
19 int GetCurrentFirefoxMajorVersion(); 20 int GetCurrentFirefoxMajorVersion();
20 21
22 #if defined(OS_WIN)
21 // Gets the full path of the profiles.ini file. This file records 23 // Gets the full path of the profiles.ini file. This file records
22 // the profiles that can be used by Firefox. Returns an empty 24 // the profiles that can be used by Firefox. Returns an empty
23 // string if failed. 25 // string if failed.
24 std::wstring GetProfilesINI(); 26 std::wstring GetProfilesINI();
25 27
26 // Detects where Firefox lives. Returns a empty string if Firefox
27 // is not installed.
28 std::wstring GetFirefoxInstallPath();
29
30 // Parses the profile.ini file, and stores its information in |root|. 28 // Parses the profile.ini file, and stores its information in |root|.
31 // This file is a plain-text file. Key/value pairs are stored one per 29 // This file is a plain-text file. Key/value pairs are stored one per
32 // line, and they are separeated in different sections. For example: 30 // line, and they are separeated in different sections. For example:
33 // [General] 31 // [General]
34 // StartWithLastProfile=1 32 // StartWithLastProfile=1
35 // 33 //
36 // [Profile0] 34 // [Profile0]
37 // Name=default 35 // Name=default
38 // IsRelative=1 36 // IsRelative=1
39 // Path=Profiles/abcdefeg.default 37 // Path=Profiles/abcdefeg.default
40 // We set "[value]" in path "<Section>.<Key>". For example, the path 38 // We set "[value]" in path "<Section>.<Key>". For example, the path
41 // "Genenral.StartWithLastProfile" has the value "1". 39 // "Genenral.StartWithLastProfile" has the value "1".
42 void ParseProfileINI(std::wstring file, DictionaryValue* root); 40 void ParseProfileINI(std::wstring file, DictionaryValue* root);
41 #endif
42
43 // Detects where Firefox lives. Returns a empty string if Firefox
44 // is not installed.
45 std::wstring GetFirefoxInstallPath();
43 46
44 // Returns true if we want to add the URL to the history. We filter 47 // Returns true if we want to add the URL to the history. We filter
45 // out the URL with a unsupported scheme. 48 // out the URL with a unsupported scheme.
46 bool CanImportURL(const GURL& url); 49 bool CanImportURL(const GURL& url);
47 50
48 // Parses the OpenSearch XML files in |xml_files| and populates |search_engines| 51 // Parses the OpenSearch XML files in |xml_files| and populates |search_engines|
49 // with the resulting TemplateURLs. 52 // with the resulting TemplateURLs.
50 void ParseSearchEnginesFromXMLFiles(const std::vector<std::wstring>& xml_files, 53 void ParseSearchEnginesFromXMLFiles(const std::vector<std::wstring>& xml_files,
51 std::vector<TemplateURL*>* search_engines); 54 std::vector<TemplateURL*>* search_engines);
52 55
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 #endif 209 #endif
207 210
208 // True if NSS_Init() has been called 211 // True if NSS_Init() has been called
209 bool is_nss_initialized_; 212 bool is_nss_initialized_;
210 213
211 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor); 214 DISALLOW_COPY_AND_ASSIGN(NSSDecryptor);
212 }; 215 };
213 216
214 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ 217 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_
215 218
OLDNEW
« no previous file with comments | « chrome/browser/browser.scons ('k') | chrome/browser/importer/firefox_importer_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698