Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index d769c3969a502d9cdc0040954fe9c27054b59171..7257d3b32b9b46bfba92e7ccf0da57ec90cb4bc7 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -16,6 +16,7 @@ |
| #include "base/location.h" |
| #include "base/logging.h" |
| #include "base/macros.h" |
| +#include "base/memory/memory_coordinator_proxy.h" |
| #include "base/memory/memory_pressure_monitor.h" |
| #include "base/memory/ptr_util.h" |
| #include "base/metrics/field_trial.h" |
| @@ -1393,6 +1394,10 @@ void BrowserMainLoop::InitializeMemoryManagementComponent() { |
| if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { |
| // Disable MemoryPressureListener when memory coordinator is enabled. |
| base::MemoryPressureListener::SetNotificationsSuppressed(true); |
| + base::MemoryCoordinatorProxy::GetInstance()-> |
| + SetGetCurrentMemoryStateCallback(base::Bind( |
| + &MemoryCoordinator::GetCurrentMemoryState, |
| + base::Unretained(MemoryCoordinator::GetInstance()))); |
|
danakj
2016/10/21 18:56:30
Can you leave a comment explaining why Unretained
hajimehoshi
2016/10/24 06:51:06
Done.
|
| return; |
| } |