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

Unified Diff: base/prefs/default_pref_store.cc

Issue 11365112: Change PrefStore::ReadResult to a boolean. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/prefs/json_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/default_pref_store.cc
diff --git a/base/prefs/default_pref_store.cc b/base/prefs/default_pref_store.cc
index c031221496e54eeb89601c87ba09259ccf387ebc..3f902c44b5533c509a5b846433043e6418164ebd 100644
--- a/base/prefs/default_pref_store.cc
+++ b/base/prefs/default_pref_store.cc
@@ -9,18 +9,18 @@ using base::Value;
DefaultPrefStore::DefaultPrefStore() {}
void DefaultPrefStore::SetDefaultValue(const std::string& key, Value* value) {
- CHECK(GetValue(key, NULL) == READ_NO_VALUE);
+ DCHECK(!GetValue(key, NULL));
Mattias Nissler (ping if slow) 2012/11/08 10:29:58 Why did you switch to a DCHECK here?
Bernhard Bauer 2012/11/08 12:18:28 It seemed like the sort of internal invariant that
Mattias Nissler (ping if slow) 2012/11/08 12:35:17 Well, not here, but this would imply registering a
Bernhard Bauer 2012/11/08 14:03:24 Done.
SetValue(key, value);
}
void DefaultPrefStore::RemoveDefaultValue(const std::string& key) {
- CHECK(GetValue(key, NULL) == READ_OK);
+ DCHECK(GetValue(key, NULL));
Mattias Nissler (ping if slow) 2012/11/08 10:29:58 ditto
RemoveValue(key);
}
base::Value::Type DefaultPrefStore::GetType(const std::string& key) const {
- const Value* value;
- return GetValue(key, &value) == READ_OK ? value->GetType() : Value::TYPE_NULL;
+ const Value* value = NULL;
+ return GetValue(key, &value) ? value->GetType() : Value::TYPE_NULL;
}
DefaultPrefStore::~DefaultPrefStore() {}
« no previous file with comments | « no previous file | base/prefs/json_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698