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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2694083005: memory-infra: Finish moving memory_infra from TracingController (Closed)
Patch Set: . Created 3 years, 10 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: 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..ae2427b8abc54aa393b1f24114c74a2e9dc55fe1 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,13 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
base::Bind(&metrics::LeakDetectorRemoteController::Create),
ui_task_runner);
#endif
+
+ registry->AddInterface(
+ base::Bind(
+ &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
+ base::Unretained(memory_instrumentation::CoordinatorImpl::GetInstance(
+ ui_task_runner.get()))),
+ ui_task_runner);
oystein (OOO til 10th of July) 2017/02/16 20:50:00 Does this need to be running on the UI thread?
chiniforooshan 2017/02/16 22:54:15 Coordinator is not thread safe and all calls shoul
oystein (OOO til 10th of July) 2017/02/16 23:19:49 Acknowledged, not changing existing behavior makes
}
void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
@@ -3097,6 +3105,15 @@ void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
registry->AddInterface(
base::Bind(&metrics::CallStackProfileCollector::Create,
metrics::CallStackProfileParams::GPU_PROCESS));
+
+ auto ui_task_runner = content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::UI);
+ registry->AddInterface(
+ base::Bind(
+ &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
+ base::Unretained(memory_instrumentation::CoordinatorImpl::GetInstance(
+ ui_task_runner.get()))),
+ ui_task_runner);
}
void ChromeContentBrowserClient::RegisterInProcessServices(

Powered by Google App Engine
This is Rietveld 408576698