Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / base / prefs / scoped_user_pref_update.cc
index 41b654c..7871c75 100644 (file)
@@ -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_;