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

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

Issue 10830098: Get the Firefox branding name dynamically (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // |prefs| is not filled). 89 // |prefs| is not filled).
90 // Note: for strings, only valid UTF-8 string values are supported. If a 90 // Note: for strings, only valid UTF-8 string values are supported. If a
91 // key/pair is not valid UTF-8, it is ignored and will not appear in |prefs|. 91 // key/pair is not valid UTF-8, it is ignored and will not appear in |prefs|.
92 bool ParsePrefFile(const FilePath& pref_file, base::DictionaryValue* prefs); 92 bool ParsePrefFile(const FilePath& pref_file, base::DictionaryValue* prefs);
93 93
94 // Parses the value of a particular firefox preference from a string that is the 94 // Parses the value of a particular firefox preference from a string that is the
95 // contents of the prefs file. 95 // contents of the prefs file.
96 std::string GetPrefsJsValue(const std::string& prefs, 96 std::string GetPrefsJsValue(const std::string& prefs,
97 const std::string& pref_key); 97 const std::string& pref_key);
98 98
99 // Returns the Firefox branding name stored in the application.ini file.
100 // This is useful to differentiate between Firefox and Iceweasel.
101 // A sample application.ini file is the following:
102 // [App]
103 // Vendor=Mozilla
104 // Name=Iceweasel
105 // Profile=mozilla/firefox
106 // Version=3.5.16
107 // BuildID=20120421070307
108 // Copyright=Copyright (c) 1998 - 2010 mozilla.org
109 // ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
110 // .........................................
111 // For this example the function would return "Iceweasel".
112 // The application.ini file is stored in the Firefox application directory.
113 // If anything goes wrong while trying to obtain the branding name,
114 // the function returns an empty string.
Ilya Sherman 2012/08/03 23:12:29 Optional nit: This comment is very nice and detail
cristian.patrasciuc 2012/08/07 15:46:49 Done.
115 std::string GetFirefoxBrandingName(const FilePath& app_path);
116
99 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ 117 #endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698