| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 9b0b2bbac62e8c23b2bf8926361a37cfd785ac39..30c0697488e2c927eb1465d0ae764f4e33049514 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -196,6 +196,7 @@
|
| #include "printing/features/features.h"
|
| #include "services/image_decoder/public/interfaces/constants.mojom.h"
|
| #include "services/preferences/public/interfaces/preferences.mojom.h"
|
| +#include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
|
| #include "services/service_manager/public/cpp/interface_provider.h"
|
| #include "services/service_manager/public/cpp/interface_registry.h"
|
| #include "services/service_manager/public/cpp/service.h"
|
| @@ -3001,6 +3002,12 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
|
| base::Bind(&metrics::LeakDetectorRemoteController::Create),
|
| ui_task_runner);
|
| #endif
|
| +
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(
|
| + &ChromeContentBrowserClient::ExposeMemoryInstrumentationOnUIThread,
|
| + base::Unretained(this), base::Unretained(registry)));
|
| }
|
|
|
| void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
|
| @@ -3097,6 +3104,24 @@ void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
|
| registry->AddInterface(
|
| base::Bind(&metrics::CallStackProfileCollector::Create,
|
| metrics::CallStackProfileParams::GPU_PROCESS));
|
| +
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(
|
| + &ChromeContentBrowserClient::ExposeMemoryInstrumentationOnUIThread,
|
| + base::Unretained(this), base::Unretained(registry)));
|
| +}
|
| +
|
| +void ChromeContentBrowserClient::ExposeMemoryInstrumentationOnUIThread(
|
| + service_manager::InterfaceRegistry* registry) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + registry->AddInterface(
|
| + base::Bind(
|
| + &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
|
| + base::Unretained(
|
| + memory_instrumentation::CoordinatorImpl::GetInstance())),
|
| + content::BrowserThread::GetTaskRunnerForThread(
|
| + content::BrowserThread::UI));
|
| }
|
|
|
| void ChromeContentBrowserClient::RegisterInProcessServices(
|
|
|