| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/memory/memory_coordinator_client_registry.h" | 5 #include "base/memory/memory_coordinator_client_registry.h" |
| 6 | 6 |
| 7 namespace base { | 7 namespace base { |
| 8 | 8 |
| 9 // static | 9 // static |
| 10 MemoryCoordinatorClientRegistry* | 10 MemoryCoordinatorClientRegistry* |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void MemoryCoordinatorClientRegistry::Unregister( | 27 void MemoryCoordinatorClientRegistry::Unregister( |
| 28 MemoryCoordinatorClient* client) { | 28 MemoryCoordinatorClient* client) { |
| 29 clients_->RemoveObserver(client); | 29 clients_->RemoveObserver(client); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void MemoryCoordinatorClientRegistry::Notify(MemoryState state) { | 32 void MemoryCoordinatorClientRegistry::Notify(MemoryState state) { |
| 33 clients_->Notify(FROM_HERE, | 33 clients_->Notify(FROM_HERE, |
| 34 &base::MemoryCoordinatorClient::OnMemoryStateChange, state); | 34 &base::MemoryCoordinatorClient::OnMemoryStateChange, state); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void MemoryCoordinatorClientRegistry::PurgeMemory() { |
| 38 clients_->Notify(FROM_HERE, &base::MemoryCoordinatorClient::OnPurgeMemory); |
| 39 } |
| 40 |
| 37 } // namespace base | 41 } // namespace base |
| OLD | NEW |