Chromium Code Reviews| 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..ed7899203f3b86bd9d89900c5840c3423382d80d 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,10 @@ |
| #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/content/browser/data_reduction_proxy_ui_service.h" |
|
bengr
2014/12/29 18:45:41
Can you forward declare this instead?
megjablon
2014/12/30 23:39:59
Done.
|
| +#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
| +#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h" |
|
bengr
2014/12/29 18:45:41
Is this needed?
megjablon
2014/12/30 23:39:59
No. Done.
|
| #include "components/navigation_interception/intercept_navigation_delegate.h" |
| #endif |
| @@ -523,6 +527,23 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles( |
| } |
| #endif |
| +#if defined(OS_ANDROID) |
| + if (io_data->IsDataReductionProxyEnabled() && |
| + data_reduction_proxy::DataReductionProxyParams:: |
| + IsIncludedInBypassWarningTrial()) { |
| + data_reduction_proxy::DataReductionProxyParams* params = |
| + io_data->data_reduction_proxy_params(); |
| + data_reduction_proxy::DataReductionProxyUIService* service = |
| + io_data->data_reduction_proxy_ui_service(); |
| + |
| + if (params && service) { |
|
bengr
2014/12/29 18:45:41
Is it possible for params to be null here? If not,
megjablon
2014/12/30 23:39:59
Done.
|
| + 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; |