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

Unified Diff: base/prefs/scoped_user_pref_update.cc

Issue 383683002: DCHECK(CalledOnValidThread()) for ScopedUserPrefUpdate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « base/prefs/pref_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « base/prefs/pref_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698