Commit 86bb4e65 authored by battre@chromium.org's avatar battre@chromium.org

DCHECK(CalledOnValidThread()) for ScopedUserPrefUpdate

BUG=392781

Review URL: https://codereview.chromium.org/383683002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282362 0039d316-1c4b-4281-b951-d872f2087c98
parent 4b7d21a5
......@@ -432,6 +432,7 @@ base::Value* PrefService::GetMutableUserPref(const char* path,
}
void PrefService::ReportUserPrefChanged(const std::string& key) {
DCHECK(CalledOnValidThread());
user_pref_store_->ReportValueChanged(key);
}
......
......@@ -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_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment