diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 04:45:54 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 04:45:54 +0000 |
commit | f988638e6ea5a3f16e289be9ac7ffd853f7a13e4 (patch) | |
tree | 21a390713263cede93537c0651656e83acbc5965 /chrome/installer/util/master_preferences.h | |
parent | 39b22b7c4c5c45183a5224449f0f82d7998a70e0 (diff) | |
download | chromium_src-f988638e6ea5a3f16e289be9ac7ffd853f7a13e4.zip chromium_src-f988638e6ea5a3f16e289be9ac7ffd853f7a13e4.tar.gz chromium_src-f988638e6ea5a3f16e289be9ac7ffd853f7a13e4.tar.bz2 |
Allow the use of the master_preferences file in Linux.
Also refactor FirstRunTabs to use GURL instead of wstring.
BUG=none
TEST=Add master_preferences file to directory containing the chrome binary and
execute chrome with the --first-run option.
Original patch by bgmerrell@gmail.com at
http://codereview.chromium.org/551160
Review URL: http://codereview.chromium.org/796001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/master_preferences.h')
-rw-r--r-- | chrome/installer/util/master_preferences.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h index 96d2fb6..cc7b8a1 100644 --- a/chrome/installer/util/master_preferences.h +++ b/chrome/installer/util/master_preferences.h @@ -8,8 +8,11 @@ #ifndef CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ #define CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ +#include <vector> + #include "base/file_path.h" #include "base/values.h" +#include "googleurl/src/gurl.h" namespace installer_util { @@ -64,7 +67,7 @@ extern const wchar_t kExtensionsBlock[]; // This is the default name for the master preferences file used to pre-set // values in the user profile at first run. -const wchar_t kDefaultMasterPrefs[] = L"master_preferences"; +const char kDefaultMasterPrefs[] = "master_preferences"; // Gets the value of given boolean preference |name| from |prefs| dictionary // which is assumed to contain a dictionary named "distribution". Returns @@ -138,9 +141,9 @@ DictionaryValue* ParseDistributionPreferences( // // Note that the entries are usually urls but they don't have to. // -// This function retuns the list as a vector of strings. If the master +// This function retuns the list as a vector of GURLs. If the master // preferences file does not contain such list the vector is empty. -std::vector<std::wstring> GetFirstRunTabs(const DictionaryValue* prefs); +std::vector<GURL> GetFirstRunTabs(const DictionaryValue* prefs); // As part of the master preferences an optional section indicates the // pre-installed bookmarks. An example is the following: @@ -154,9 +157,9 @@ std::vector<std::wstring> GetFirstRunTabs(const DictionaryValue* prefs); // // Note that the entries need to be urls. // -// This function retuns the list as a vector of strings. If the master +// This function retuns the list as a vector of GURLs. If the master // preferences file does not contain such list the vector is empty. -std::vector<std::wstring> GetDefaultBookmarks(const DictionaryValue* prefs); +std::vector<GURL> GetDefaultBookmarks(const DictionaryValue* prefs); // Sets the value of given boolean preference |name| in "distribution" // dictionary inside |prefs| dictionary. |