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

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 684223003: Data Reduction Proxy Interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years 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/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..5ddd95d90de04dc643a2c1491ed99479ed5f20b0 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"
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
#include "components/navigation_interception/intercept_navigation_delegate.h"
#endif
@@ -110,6 +114,8 @@ using extensions::StreamsPrivateAPI;
#endif
#if defined(OS_ANDROID)
bengr 2014/12/17 00:30:19 Remove #if defined. Remove usings. Better to spel
megjablon 2014/12/23 02:18:03 Done.
+using data_reduction_proxy::DataReductionProxyParams;
+using data_reduction_proxy::DataReductionProxyResourceThrottle;
using navigation_interception::InterceptNavigationDelegate;
#endif
@@ -523,6 +529,21 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
}
#endif
+#if defined(OS_ANDROID)
bengr 2014/12/17 00:30:19 Remove #if defined.
megjablon 2014/12/23 02:18:04 We decided not to have a base class as discussed o
+ if (io_data->IsDataReductionProxyEnabled() &&
+ DataReductionProxyParams::IsIncludedInBypassWarningTrial()) {
+ DataReductionProxyParams* params = io_data->data_reduction_proxy_params();
+ data_reduction_proxy::DataReductionProxyUIService* service =
+ io_data->data_reduction_proxy_ui_service();
+
+ if (params && service) {
+ throttles->push_back(new DataReductionProxyResourceThrottle(
+ request, resource_type, service, params));
+ }
+
bengr 2014/12/17 00:30:19 Remove blank line.
megjablon 2014/12/23 02:18:04 Done.
+ }
+#endif
+
#if defined(ENABLE_SUPERVISED_USERS)
bool is_subresource_request =
resource_type != content::RESOURCE_TYPE_MAIN_FRAME;

Powered by Google App Engine
This is Rietveld 408576698