| Index: chrome/common/pref_service.h
|
| ===================================================================
|
| --- chrome/common/pref_service.h (revision 10837)
|
| +++ chrome/common/pref_service.h (working copy)
|
| @@ -17,6 +17,7 @@
|
|
|
| #include <set>
|
|
|
| +#include "base/file_path.h"
|
| #include "base/hash_tables.h"
|
| #include "base/non_thread_safe.h"
|
| #include "base/observer_list.h"
|
| @@ -76,7 +77,7 @@
|
| };
|
|
|
| // |pref_filename| is the path to the prefs file we will try to load or save to.
|
| - explicit PrefService(const std::wstring& pref_filename);
|
| + explicit PrefService(const FilePath& pref_filename);
|
| ~PrefService();
|
|
|
| // Reloads the data from file. This should only be called when the importer
|
| @@ -108,6 +109,8 @@
|
| double default_value);
|
| void RegisterStringPref(const wchar_t* path,
|
| const std::wstring& default_value);
|
| + void RegisterFilePathPref(const wchar_t* path,
|
| + const FilePath& default_value);
|
| void RegisterListPref(const wchar_t* path);
|
| void RegisterDictionaryPref(const wchar_t* path);
|
|
|
| @@ -131,6 +134,7 @@
|
| int GetInteger(const wchar_t* path) const;
|
| double GetReal(const wchar_t* path) const;
|
| std::wstring GetString(const wchar_t* path) const;
|
| + FilePath GetFilePath(const wchar_t* path) const;
|
|
|
| // Returns the branch if it exists. If it's not a branch or the branch does
|
| // not exist, returns NULL. This does
|
| @@ -150,6 +154,7 @@
|
| void SetInteger(const wchar_t* path, int value);
|
| void SetReal(const wchar_t* path, double value);
|
| void SetString(const wchar_t* path, const std::wstring& value);
|
| + void SetFilePath(const wchar_t* path, const FilePath& value);
|
|
|
| // Used to set the value of dictionary or list values in the pref tree. This
|
| // will create a dictionary or list if one does not exist in the pref tree.
|
| @@ -196,7 +201,7 @@
|
| PrefService();
|
|
|
| // Reads the data from the given file, returning true on success.
|
| - bool LoadPersistentPrefs(const std::wstring& file_path);
|
| + bool LoadPersistentPrefs(const FilePath& file_path);
|
|
|
| // Add a preference to the PreferenceMap. If the pref already exists, return
|
| // false. This method takes ownership of |pref|.
|
| @@ -218,7 +223,7 @@
|
| scoped_ptr<DictionaryValue> transient_;
|
|
|
| // The filename that we're loading/saving the prefs to.
|
| - std::wstring pref_filename_;
|
| + FilePath pref_filename_;
|
|
|
| // Task used by ScheduleSavePersistentPrefs to avoid lots of little saves.
|
| ScopedRunnableMethodFactory<PrefService> save_preferences_factory_;
|
|
|