Index: base/prefs/scoped_user_pref_update.cc |
diff --git a/base/prefs/scoped_user_pref_update.cc b/base/prefs/scoped_user_pref_update.cc |
index 41b654cd58c9ab1efae397e3ee5f57191e7d8b8a..7871c75ce3783ab84156d188fd58b087927e2cfd 100644 |
--- a/base/prefs/scoped_user_pref_update.cc |
+++ b/base/prefs/scoped_user_pref_update.cc |
@@ -14,13 +14,16 @@ ScopedUserPrefUpdateBase::ScopedUserPrefUpdateBase(PrefService* service, |
const char* path) |
: service_(service), |
path_(path), |
- value_(NULL) {} |
+ value_(NULL) { |
+ DCHECK(service_->CalledOnValidThread()); |
+} |
ScopedUserPrefUpdateBase::~ScopedUserPrefUpdateBase() { |
Notify(); |
} |
base::Value* ScopedUserPrefUpdateBase::GetValueOfType(base::Value::Type type) { |
+ DCHECK(CalledOnValidThread()); |
if (!value_) |
value_ = service_->GetMutableUserPref(path_.c_str(), type); |
return value_; |