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

Unified Diff: components/login/screens/screen_context.cc

Issue 2910073003: Replace deprecated base::NonThreadSafe in components/login in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 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 | « components/login/screens/screen_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/login/screens/screen_context.cc
diff --git a/components/login/screens/screen_context.cc b/components/login/screens/screen_context.cc
index 5e170b682d8f5d7cb067599ad90e56ab76891b6c..3473d9c3fcab7fc5f1445f9540f9d2a83f64a612 100644
--- a/components/login/screens/screen_context.cc
+++ b/components/login/screens/screen_context.cc
@@ -29,6 +29,7 @@ ScreenContext::ScreenContext() {
}
ScreenContext::~ScreenContext() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
bool ScreenContext::SetBoolean(const KeyType& key, bool value) {
@@ -131,17 +132,17 @@ void ScreenContext::CopyFrom(ScreenContext& context) {
}
bool ScreenContext::HasKey(const KeyType& key) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return storage_.HasKey(key);
}
bool ScreenContext::HasChanges() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return !changes_.empty();
}
void ScreenContext::GetChangesAndReset(base::DictionaryValue* diff) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(diff);
changes_.Swap(diff);
changes_.Clear();
@@ -149,7 +150,7 @@ void ScreenContext::GetChangesAndReset(base::DictionaryValue* diff) {
void ScreenContext::ApplyChanges(const base::DictionaryValue& diff,
std::vector<std::string>* keys) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!HasChanges());
if (keys) {
keys->clear();
@@ -165,7 +166,7 @@ void ScreenContext::ApplyChanges(const base::DictionaryValue& diff,
}
bool ScreenContext::Set(const KeyType& key, base::Value* value) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(value);
std::unique_ptr<base::Value> new_value(value);
« no previous file with comments | « components/login/screens/screen_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698