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..ed5ce60fb46bb9fcb095e6754e10b5e13f5bed5b 100644 |
--- a/base/prefs/scoped_user_pref_update.cc |
+++ b/base/prefs/scoped_user_pref_update.cc |
@@ -14,13 +14,17 @@ ScopedUserPrefUpdateBase::ScopedUserPrefUpdateBase(PrefService* service, |
const char* path) |
: service_(service), |
path_(path), |
- value_(NULL) {} |
+ value_(NULL) { |
+ DCHECK(service_->CalledOnValidThread()); |
+} |
ScopedUserPrefUpdateBase::~ScopedUserPrefUpdateBase() { |
+ DCHECK(CalledOnValidThread()); |
Bernhard Bauer
2014/07/10 09:12:09
This check isn't necessary; ScopedUserPrefUpdateBa
battre
2014/07/10 11:16:33
Done.
|
Notify(); |
} |
base::Value* ScopedUserPrefUpdateBase::GetValueOfType(base::Value::Type type) { |
+ DCHECK(CalledOnValidThread()); |
if (!value_) |
value_ = service_->GetMutableUserPref(path_.c_str(), type); |
return value_; |