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

Unified Diff: chrome/browser/prefs/pref_service.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
Index: chrome/browser/prefs/pref_service.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 40ae0d30b0261aae0a69afaa4011fde313392145..d36507ac98aab28fbe232aa251150fd7cea28303 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -731,7 +731,7 @@ const base::Value* PrefService::GetUserPrefValue(const char* path) const {
// Look for an existing preference in the user store. If it doesn't
// exist, return NULL.
base::Value* value = NULL;
- if (user_pref_store_->GetMutableValue(path, &value) != PrefStore::READ_OK)
+ if (!user_pref_store_->GetMutableValue(path, &value))
return NULL;
if (!value->IsType(pref->GetType())) {
@@ -746,7 +746,7 @@ const base::Value* PrefService::GetDefaultPrefValue(const char* path) const {
DCHECK(CalledOnValidThread());
// Lookup the preference in the default store.
const base::Value* value = NULL;
- if (default_store_->GetValue(path, &value) != PrefStore::READ_OK) {
+ if (!default_store_->GetValue(path, &value)) {
NOTREACHED() << "Default value missing for pref: " << path;
return NULL;
}
@@ -932,7 +932,7 @@ Value* PrefService::GetMutableUserPref(const char* path,
// Look for an existing preference in the user store. If it doesn't
// exist or isn't the correct type, create a new user preference.
Value* value = NULL;
- if (user_pref_store_->GetMutableValue(path, &value) != PrefStore::READ_OK ||
+ if (!user_pref_store_->GetMutableValue(path, &value) ||
!value->IsType(type)) {
if (type == Value::TYPE_DICTIONARY) {
value = new DictionaryValue;

Powered by Google App Engine
This is Rietveld 408576698