Chromium Code Reviews

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

Issue 3221007: Fix a couple of firefox search engine import bugs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: added test, TODO Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 14
14 class DictionaryValue; 15 class DictionaryValue;
15 class FilePath; 16 class FilePath;
16 class GURL; 17 class GURL;
17 class TemplateURL; 18 class TemplateURL;
18 19
(...skipping 69 matching lines...)
88 bool IsDefaultHomepage(const GURL& homepage, const FilePath& app_path); 89 bool IsDefaultHomepage(const GURL& homepage, const FilePath& app_path);
89 90
90 // Parses the prefs found in the file |pref_file| and puts the key/value pairs 91 // Parses the prefs found in the file |pref_file| and puts the key/value pairs
91 // in |prefs|. Keys are strings, and values can be strings, booleans or 92 // in |prefs|. Keys are strings, and values can be strings, booleans or
92 // integers. Returns true if it succeeded, false otherwise (in which case 93 // integers. Returns true if it succeeded, false otherwise (in which case
93 // |prefs| is not filled). 94 // |prefs| is not filled).
94 // Note: for strings, only valid UTF-8 string values are supported. If a 95 // Note: for strings, only valid UTF-8 string values are supported. If a
95 // key/pair is not valid UTF-8, it is ignored and will not appear in |prefs|. 96 // key/pair is not valid UTF-8, it is ignored and will not appear in |prefs|.
96 bool ParsePrefFile(const FilePath& pref_file, DictionaryValue* prefs); 97 bool ParsePrefFile(const FilePath& pref_file, DictionaryValue* prefs);
97 98
99 // Parses the value of a particular firefox preference from a string that is
100 // the contents of the prefs file.
101 std::string GetPrefsJsValue(const std::string& prefs,
102 const std::string& pref_key);
103
98 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ 104 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox3_importer.cc ('k') | chrome/browser/importer/firefox_importer_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine