| 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 11 matching lines...) Expand all Loading... |
| 22 void MemoryCoordinatorClientRegistry::Register( | 22 void MemoryCoordinatorClientRegistry::Register( |
| 23 MemoryCoordinatorClient* client) { | 23 MemoryCoordinatorClient* client) { |
| 24 clients_->AddObserver(client); | 24 clients_->AddObserver(client); |
| 25 } | 25 } |
| 26 | 26 |
| 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) { |
| 33 clients_->Notify(FROM_HERE, |
| 34 &base::MemoryCoordinatorClient::OnMemoryStateChange, state); |
| 35 } |
| 36 |
| 32 } // namespace base | 37 } // namespace base |
| OLD | NEW |