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

Unified Diff: content/browser/memory/memory_coordinator_impl.cc

Issue 2913683002: Replace deprecated base::NonThreadSafe in content/browser/memory 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 | « content/browser/memory/memory_coordinator_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_coordinator_impl.cc
diff --git a/content/browser/memory/memory_coordinator_impl.cc b/content/browser/memory/memory_coordinator_impl.cc
index d0b138dfc034f90473521d82e797296b30631169..1f59ea6761bbc23c4f80536aebcd6127d715c8cb 100644
--- a/content/browser/memory/memory_coordinator_impl.cc
+++ b/content/browser/memory/memory_coordinator_impl.cc
@@ -147,11 +147,12 @@ MemoryCoordinatorImpl::MemoryCoordinatorImpl(
}
MemoryCoordinatorImpl::~MemoryCoordinatorImpl() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
base::MemoryCoordinatorProxy::SetMemoryCoordinator(nullptr);
}
void MemoryCoordinatorImpl::Start() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(last_state_change_.is_null());
notification_registrar_.Add(
@@ -304,7 +305,7 @@ void MemoryCoordinatorImpl::Observe(int type,
MemoryState MemoryCoordinatorImpl::GetStateForProcess(
base::ProcessHandle handle) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (handle == base::kNullProcessHandle)
return MemoryState::UNKNOWN;
if (handle == base::GetCurrentProcessHandle())
@@ -320,7 +321,7 @@ MemoryState MemoryCoordinatorImpl::GetStateForProcess(
void MemoryCoordinatorImpl::UpdateConditionIfNeeded(
MemoryCondition next_condition) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (next_condition == MemoryCondition::WARNING)
policy_->OnWarningCondition();
« no previous file with comments | « content/browser/memory/memory_coordinator_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698