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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2063683002: Migrate components/data_reduction_proxy to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and move AddService call into RegisterRenderProcessMojoServices() 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 1448be55bbba74a6e3c5d6f6893af841e8144917..41a9b856b5f9065864420b08204ebded8631f855 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -117,7 +117,7 @@
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
-#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h"
+#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h"
#include "components/dom_distiller/core/dom_distiller_switches.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/error_page/common/error_page_switches.h"
@@ -989,10 +989,6 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
#if defined(OS_ANDROID)
host->AddFilter(new cdm::CdmMessageFilterAndroid());
#endif
- DataReductionProxyChromeSettings* data_reduction_proxy_settings =
- DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
- host->AddFilter(new data_reduction_proxy::DataReductionProxyMessageFilter(
- data_reduction_proxy_settings));
host->GetImmediateSender()->Send(new ChromeViewMsg_SetIsIncognitoProcess(
profile->IsOffTheRecord()));
@@ -2722,6 +2718,15 @@ void ChromeContentBrowserClient::RegisterRenderProcessMojoServices(
content::RenderProcessHost* render_process_host) {
registry->AddService(
base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
+
+ Profile* profile =
+ Profile::FromBrowserContext(render_process_host->GetBrowserContext());
+ DataReductionProxyChromeSettings* data_reduction_proxy_settings =
+ DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
+ registry->AddService(
+ base::Bind(&data_reduction_proxy::DataReductionProxyHostImpl::Create,
+ data_reduction_proxy_settings),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
}
void ChromeContentBrowserClient::RegisterFrameMojoShellServices(

Powered by Google App Engine
This is Rietveld 408576698