summaryrefslogtreecommitdiffstats
path: root/base/prefs/pref_service.h
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 00:52:35 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 00:52:35 +0000
commitddf421c3f57f11340ed8d263f3aa47513e5adb46 (patch)
tree7a0112b4ee1f5cb9f5dbc3a91b5e29d099592f43 /base/prefs/pref_service.h
parent9f10ec33813708ec699c833f84a8b6a06bf7b20f (diff)
downloadchromium_src-ddf421c3f57f11340ed8d263f3aa47513e5adb46.zip
chromium_src-ddf421c3f57f11340ed8d263f3aa47513e5adb46.tar.gz
chromium_src-ddf421c3f57f11340ed8d263f3aa47513e5adb46.tar.bz2
Change the PrefService::GetPreferenceValues() interface to return a scoped_ptr.
Fix leak of DictionaryValue in PrefsFunctionalTest.TestHaveLocalStatePrefs. BUG=313722 TBR=bauerb@chromium.org, phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/46763006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/prefs/pref_service.h')
-rw-r--r--base/prefs/pref_service.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/prefs/pref_service.h b/base/prefs/pref_service.h
index a0c37353..e7b8914 100644
--- a/base/prefs/pref_service.h
+++ b/base/prefs/pref_service.h
@@ -229,7 +229,7 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// Returns a dictionary with effective preference values. The ownership
// is passed to the caller.
- base::DictionaryValue* GetPreferenceValues() const;
+ scoped_ptr<base::DictionaryValue> GetPreferenceValues() const;
// Returns a dictionary with effective preference values. Contrary to
// GetPreferenceValues(), the paths of registered preferences are not split on
@@ -239,7 +239,8 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// like this:
// {"foo.bar": {"a": {"b": true}}}.
// The ownership is passed to the caller.
- base::DictionaryValue* GetPreferenceValuesWithoutPathExpansion() const;
+ scoped_ptr<base::DictionaryValue> GetPreferenceValuesWithoutPathExpansion()
+ const;
bool ReadOnly() const;