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

Unified Diff: components/memory_coordinator/browser/memory_coordinator.cc

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: WIP Created 4 years, 4 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/browser/memory_coordinator.cc
diff --git a/components/memory_coordinator/browser/memory_coordinator.cc b/components/memory_coordinator/browser/memory_coordinator.cc
index c1119c98e4bdc57e27ecc5e14778cfab9f405619..6399d0c09a2994cbb301eb4a05739382da6e5ca2 100644
--- a/components/memory_coordinator/browser/memory_coordinator.cc
+++ b/components/memory_coordinator/browser/memory_coordinator.cc
@@ -42,11 +42,14 @@ MemoryCoordinator* MemoryCoordinator::GetInstance() {
}
MemoryCoordinator::MemoryCoordinator()
- : pressure_listener_(
- base::Bind(&MemoryCoordinator::OnMemoryPressure,
- base::Unretained(this))) {}
+ : pressure_listener_(base::Bind(&MemoryCoordinator::OnMemoryPressure,
+ base::Unretained(this))) {
+ ClientRegistry::SetInstance(this);
+}
-MemoryCoordinator::~MemoryCoordinator() {}
+MemoryCoordinator::~MemoryCoordinator() {
+ ClientRegistry::SetInstance(nullptr);
+}
void MemoryCoordinator::CreateHandle(
int render_process_id,

Powered by Google App Engine
This is Rietveld 408576698