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

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: Rebase Created 5 years, 11 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/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 ebddfcd6cb4684d64d41796502bada351df42957..44efc33ac3507e56b79f49929c97e17f5fa229c3 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -92,6 +92,11 @@
#include "components/navigation_interception/intercept_navigation_delegate.h"
#endif
+#if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
+#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
+#endif
+
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/login/signin/merge_session_throttle.h"
// TODO(oshima): Enable this for other platforms.
@@ -527,6 +532,18 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
}
#endif
+#if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
+ scoped_ptr<content::ResourceThrottle> data_reduction_proxy_throttle =
+ data_reduction_proxy::DataReductionProxyDebugResourceThrottle::
+ MaybeCreate(
+ io_data->IsDataReductionProxyEnabled(),
+ request, resource_type,
+ io_data->data_reduction_proxy_io_data()->debug_ui_service(),
+ io_data->data_reduction_proxy_io_data()->params());
mmenke 2015/02/02 15:45:53 Rather than dig into data_reduction_proxy_io_data'
megjablon 2015/02/03 23:21:27 Done.
+ if (data_reduction_proxy_throttle)
+ throttles->push_back(data_reduction_proxy_throttle.release());
+#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