| Index: components/memory_coordinator/common/client_registry.cc
|
| diff --git a/components/memory_coordinator/common/client_registry.cc b/components/memory_coordinator/common/client_registry.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..57866c880d774fbfccf2638c484d3d64e3209989
|
| --- /dev/null
|
| +++ b/components/memory_coordinator/common/client_registry.cc
|
| @@ -0,0 +1,21 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/memory_coordinator/common/client_registry.h"
|
| +
|
| +namespace memory_coordinator {
|
| +
|
| +ClientRegistry::ClientRegistry() : clients_(new ClientList) {}
|
| +
|
| +ClientRegistry::~ClientRegistry() {}
|
| +
|
| +void ClientRegistry::RegisterClient(MemoryCoordinatorClient* client) {
|
| + clients_->AddObserver(client);
|
| +}
|
| +
|
| +void ClientRegistry::UnregisterClient(MemoryCoordinatorClient* client) {
|
| + clients_->RemoveObserver(client);
|
| +}
|
| +
|
| +} // namespace memory_coordinator
|
|
|