| 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 ca18cbacdfd3ae581493db0f7d91263e27d95099..ed9871398c8c795e57d87cabac4aaa07f90c2895 100644
|
| --- a/content/browser/memory/memory_coordinator_impl.cc
|
| +++ b/content/browser/memory/memory_coordinator_impl.cc
|
| @@ -192,7 +192,12 @@ base::MemoryState MemoryCoordinatorImpl::GetGlobalMemoryState() const {
|
| return current_state_;
|
| }
|
|
|
| -base::MemoryState MemoryCoordinatorImpl::GetCurrentMemoryState() const {
|
| +base::WeakPtr<base::MemoryCoordinatorInterface>
|
| +MemoryCoordinatorImpl::GetWeakPtr() {
|
| + return weak_ptr_factory_.GetWeakPtr();
|
| +}
|
| +
|
| +base::MemoryState MemoryCoordinatorImpl::GetLocalMemoryState() {
|
| // SUSPENDED state may not make sense to the browser process. Use THROTTLED
|
| // instead when the global state is SUSPENDED.
|
| // TODO(bashi): Maybe worth considering another state for the browser.
|
| @@ -200,7 +205,7 @@ base::MemoryState MemoryCoordinatorImpl::GetCurrentMemoryState() const {
|
| : current_state_;
|
| }
|
|
|
| -void MemoryCoordinatorImpl::SetCurrentMemoryStateForTesting(
|
| +void MemoryCoordinatorImpl::SetMemoryStateForTesting(
|
| base::MemoryState memory_state) {
|
| // This changes the current state temporariy for testing. The state will be
|
| // updated 1 minute later.
|
| @@ -301,7 +306,7 @@ void MemoryCoordinatorImpl::UpdateState() {
|
| }
|
|
|
| void MemoryCoordinatorImpl::NotifyStateToClients() {
|
| - auto state = GetCurrentMemoryState();
|
| + auto state = GetLocalMemoryState();
|
| base::MemoryCoordinatorClientRegistry::GetInstance()->Notify(state);
|
| }
|
|
|
|
|