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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2072613003: Convert GetSearchProviderInstallState to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Gyp Created 4 years, 6 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 bb2aa36451ff92f62c614f1c5d4a24840ce6a60e..697a26d0557f2c7422532b9af396b784b778c5df 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -948,7 +948,15 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
#if defined(ENABLE_PRINTING)
host->AddFilter(new printing::PrintingMessageFilter(id, profile));
#endif
- host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile));
+ auto* search_provider = new SearchProviderInstallStateMessageFilterAdapter(
+ new SearchProviderInstallStateMessageFilter(id, profile));
+ host->GetServiceRegistry()->AddService<mojom::SearchProviderInstallState>(
+ base::Bind(&SearchProviderInstallStateMessageFilter::Bind,
+ base::Unretained(search_provider->Get())),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
+ host->SetUserData(
+ SearchProviderInstallStateMessageFilter::kRenderProcessHostKey,
+ search_provider);
#if defined(ENABLE_SPELLCHECK)
host->AddFilter(new SpellCheckMessageFilter(id));
#endif
@@ -2721,6 +2729,8 @@ void ChromeContentBrowserClient::RegisterRenderProcessMojoServices(
content::ServiceRegistry* registry) {
registry->AddService(
base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
+ registry->AddService(
+ base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
}
void ChromeContentBrowserClient::RegisterFrameMojoShellServices(

Powered by Google App Engine
This is Rietveld 408576698