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

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: Rename to search_provider.mojom 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 f788b6fdb4a5827dab4828a4430a5c419a5ddbd5..3fd48d17858ce5be72b86ce90433c7c205cc0701 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
@@ -2722,6 +2730,8 @@ void ChromeContentBrowserClient::RegisterRenderProcessMojoServices(
content::RenderProcessHost* render_process_host) {
registry->AddService(
base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
+ registry->AddService(
+ base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
Sam McNally 2016/06/20 01:27:11 Remove.
tibell 2016/06/20 03:19:55 Done.
}
void ChromeContentBrowserClient::RegisterFrameMojoShellServices(

Powered by Google App Engine
This is Rietveld 408576698