summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prefs/testing_pref_store.cc
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 16:38:31 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 16:38:31 +0000
commit68bf41ae4642cc0b1ad6f9d5c4050acaf3d7d1d5 (patch)
tree42a4b753dd5db63399fc7a55f021c0bf6adfb1ba /chrome/browser/prefs/testing_pref_store.cc
parente6eddfdb8f1a9688145e5efba334d484c738a1c6 (diff)
downloadchromium_src-68bf41ae4642cc0b1ad6f9d5c4050acaf3d7d1d5.zip
chromium_src-68bf41ae4642cc0b1ad6f9d5c4050acaf3d7d1d5.tar.gz
chromium_src-68bf41ae4642cc0b1ad6f9d5c4050acaf3d7d1d5.tar.bz2
Let PrefStore::GetValue return a const Value* instead of Value* and add PersistentPrefStore::GetMutableValue
BUG=none TEST=none Review URL: http://codereview.chromium.org/6713099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79413 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs/testing_pref_store.cc')
-rw-r--r--chrome/browser/prefs/testing_pref_store.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/prefs/testing_pref_store.cc b/chrome/browser/prefs/testing_pref_store.cc
index a3d33d8..e85a836 100644
--- a/chrome/browser/prefs/testing_pref_store.cc
+++ b/chrome/browser/prefs/testing_pref_store.cc
@@ -14,7 +14,12 @@ TestingPrefStore::TestingPrefStore()
TestingPrefStore::~TestingPrefStore() {}
PrefStore::ReadResult TestingPrefStore::GetValue(const std::string& key,
- Value** value) const {
+ const Value** value) const {
+ return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE;
+}
+
+PrefStore::ReadResult TestingPrefStore::GetMutableValue(const std::string& key,
+ Value** value) {
return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE;
}
@@ -90,7 +95,7 @@ void TestingPrefStore::SetBoolean(const std::string& key, bool value) {
bool TestingPrefStore::GetString(const std::string& key,
std::string* value) const {
- Value* stored_value;
+ const Value* stored_value;
if (!prefs_.GetValue(key, &stored_value) || !stored_value)
return false;
@@ -98,7 +103,7 @@ bool TestingPrefStore::GetString(const std::string& key,
}
bool TestingPrefStore::GetInteger(const std::string& key, int* value) const {
- Value* stored_value;
+ const Value* stored_value;
if (!prefs_.GetValue(key, &stored_value) || !stored_value)
return false;
@@ -106,7 +111,7 @@ bool TestingPrefStore::GetInteger(const std::string& key, int* value) const {
}
bool TestingPrefStore::GetBoolean(const std::string& key, bool* value) const {
- Value* stored_value;
+ const Value* stored_value;
if (!prefs_.GetValue(key, &stored_value) || !stored_value)
return false;