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

Unified Diff: components/memory_coordinator/child/child_memory_coordinator_impl.cc

Issue 2143353004: Revert of Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: components/memory_coordinator/child/child_memory_coordinator_impl.cc
diff --git a/components/memory_coordinator/child/child_memory_coordinator_impl.cc b/components/memory_coordinator/child/child_memory_coordinator_impl.cc
index d1f9f6c0009b4f79898e33e87711aedb5694c613..75889ed43f66e6463c0e9b3dc0ed578ca745b85b 100644
--- a/components/memory_coordinator/child/child_memory_coordinator_impl.cc
+++ b/components/memory_coordinator/child/child_memory_coordinator_impl.cc
@@ -7,26 +7,12 @@
namespace memory_coordinator {
ChildMemoryCoordinatorImpl::ChildMemoryCoordinatorImpl(
- shell::InterfaceProvider* remote_interfaces)
- : binding_(this), clients_(new ClientList) {
- if (remote_interfaces) {
- remote_interfaces->GetInterface(mojo::GetProxy(&parent_));
- parent_->AddChild(binding_.CreateInterfacePtrAndBind());
- }
-}
+ mojo::InterfaceRequest<mojom::ChildMemoryCoordinator> request,
+ scoped_refptr<ClientList> clients)
+ : binding_(this, std::move(request)),
+ clients_(clients) {}
-ChildMemoryCoordinatorImpl::~ChildMemoryCoordinatorImpl() {
-}
-
-void ChildMemoryCoordinatorImpl::RegisterClient(
- MemoryCoordinatorClient* client) {
- clients_->AddObserver(client);
-}
-
-void ChildMemoryCoordinatorImpl::UnregisterClient(
- MemoryCoordinatorClient* client) {
- clients_->RemoveObserver(client);
-}
+ChildMemoryCoordinatorImpl::~ChildMemoryCoordinatorImpl() {}
void ChildMemoryCoordinatorImpl::OnStateChange(mojom::MemoryState state) {
clients_->Notify(FROM_HERE, &MemoryCoordinatorClient::OnMemoryStateChange,

Powered by Google App Engine
This is Rietveld 408576698