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

Unified Diff: chrome/browser/prefs/pref_service.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review Created 9 years, 4 months 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 | « chrome/browser/prefs/pref_model_associator.cc ('k') | chrome/browser/prefs/pref_service_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 6cb98364ed38ee4d05345c2c50f46859adb20509..9eb054ad2ef8b5459a2ea36c2590294369ae024f 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -798,7 +798,7 @@ Value* PrefService::GetMutableUserPref(const char* path,
Value* value = NULL;
if (user_pref_store_->GetMutableValue(path, &value)
!= PersistentPrefStore::READ_OK ||
- !value->IsType(type)) {
+ value->GetType() != type) {
if (type == Value::TYPE_DICTIONARY) {
value = new DictionaryValue;
} else if (type == Value::TYPE_LIST) {
@@ -861,7 +861,7 @@ const Value* PrefService::Preference::GetValue() const {
const Value* found_value = NULL;
if (pref_value_store()->GetValue(name_, type_, &found_value)) {
- DCHECK(found_value->IsType(type_));
+ DCHECK(found_value->GetType() == type_);
return found_value;
}
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.cc ('k') | chrome/browser/prefs/pref_service_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698