Change PrefStore::ReadResult to a boolean.

The third value in the enum (READ_USE_DEFAULT) isn't used anymore.

[email protected],[email protected],[email protected]
BUG=none

Review URL: https://chromiumcodereview.appspot.com/11365112

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166706 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 1eb80b4..06d5b79 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -731,7 +731,7 @@
   // 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 @@
   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;
   }
@@ -789,7 +789,7 @@
   // The main code path takes ownership, but most don't. We'll be safe.
   scoped_ptr<Value> scoped_value(default_value);
 
-  DCHECK(!FindPreference(path)) << "Tried to register duplicate pref " << path;
+  CHECK(!FindPreference(path)) << "Tried to register duplicate pref " << path;
 
   base::Value::Type orig_type = default_value->GetType();
   DCHECK(orig_type != Value::TYPE_NULL && orig_type != Value::TYPE_BINARY) <<
@@ -824,10 +824,8 @@
   DCHECK(CalledOnValidThread());
 
   PreferenceMap::iterator it = prefs_map_.find(path);
-  if (it == prefs_map_.end()) {
-    NOTREACHED() << "Trying to unregister an unregistered pref: " << path;
-    return;
-  }
+  CHECK(it != prefs_map_.end()) << "Trying to unregister an unregistered pref: "
+                                << path;
 
   prefs_map_.erase(it);
   default_store_->RemoveDefaultValue(path);
@@ -932,7 +930,7 @@
   // 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;