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

Unified Diff: chrome/browser/prefs/pref_model_associator.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
Index: chrome/browser/prefs/pref_model_associator.cc
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index 88c96400ad74cdb2f1240b4f47da1d4690b2b4a7..21d6a74e860ef8cd6b2c7a3daa55fad0bfb1c4bc 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -72,9 +72,9 @@ void PrefModelAssociator::InitPrefAndAssociate(
// Update the local preference based on what we got from the
// sync server. Note: this only updates the user value store, which is
// ignored if the preference is policy controlled.
- if (new_value->IsType(Value::TYPE_NULL)) {
+ if (new_value->IsNull()) {
pref_service_->ClearPref(pref_name.c_str());
- } else if (!new_value->IsType(pref->GetType())) {
+ } else if (new_value->GetType() != pref->GetType()) {
LOG(WARNING) << "Synced value for " << preference.name()
<< " is of type " << new_value->GetType()
<< " which doesn't match pref type " << pref->GetType();
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider_win_unittest.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698