Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc |
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc |
index 854f3a4d55e8e82ceef9d5f7db629b522b86c700..c3b69dd89f537649abf633bc85371685b7b39d08 100644 |
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc |
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc |
@@ -89,6 +89,8 @@ |
#if defined(OS_ANDROID) |
#include "chrome/browser/android/intercept_download_resource_throttle.h" |
+#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_resource_throttle.h" |
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
#include "components/navigation_interception/intercept_navigation_delegate.h" |
#endif |
@@ -110,6 +112,7 @@ using extensions::StreamsPrivateAPI; |
#endif |
#if defined(OS_ANDROID) |
+using data_reduction_proxy::DataReductionProxyUIService; |
using navigation_interception::InterceptNavigationDelegate; |
#endif |
@@ -523,6 +526,24 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles( |
} |
#endif |
+#if defined(OS_ANDROID) |
+ if (io_data->IsDataReductionProxyEnabled() && |
+ data_reduction_proxy::DataReductionProxyParams:: |
+ IsInterstitalsCommandLineSwitchOn()) { |
+ data_reduction_proxy::DataReductionProxyParams* params = |
+ io_data->data_reduction_proxy_params(); |
+ data_reduction_proxy::DataReductionProxyUIService* service = |
+ io_data->data_reduction_proxy_ui_service(); |
+ DCHECK(params); |
+ DCHECK(service); |
+ |
+ throttles->push_back( |
+ new data_reduction_proxy::DataReductionProxyResourceThrottle( |
+ request, resource_type, service, params)); |
+ |
+ } |
+#endif |
+ |
#if defined(ENABLE_SUPERVISED_USERS) |
bool is_subresource_request = |
resource_type != content::RESOURCE_TYPE_MAIN_FRAME; |