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 a868c5ee155fa2e7acfa69c092fbcdc50d908eca..cae4bffdd894c715e707be47d7849c24c0bda84a 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -118,7 +118,8 @@ |
#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/data_reduction_proxy/core/browser/data_reduction_proxy_config.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" |
@@ -1002,10 +1003,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->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
profile->IsOffTheRecord())); |
@@ -2781,6 +2778,17 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer( |
base::Bind(&metrics::LeakDetectorRemoteController::Create), |
ui_task_runner); |
#endif |
+ |
+ DataReductionProxyChromeSettings* data_reduction_proxy_settings = |
+ DataReductionProxyChromeSettingsFactory::GetForBrowserContext( |
+ render_process_host->GetBrowserContext()); |
+ base::WeakPtr<data_reduction_proxy::DataReductionProxyConfig> weak_config; |
+ if (data_reduction_proxy_settings && data_reduction_proxy_settings->Config()) |
+ weak_config = data_reduction_proxy_settings->Config()->GetWeakPtr(); |
+ registry->AddInterface( |
+ base::Bind(&data_reduction_proxy::DataReductionProxyHostImpl::Create, |
+ weak_config), |
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
} |
void ChromeContentBrowserClient::ExposeInterfacesToMediaService( |