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

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

Issue 1241583009: Async Safe Browsing check, on mobile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/safe_browsing_resource_throttle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc
diff --git a/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc b/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc
index 6bda059f50c37b77e406f267a5de06c4b66e217e..d433fac26e73e0f990e0d0255629a21a0bf37ef7 100644
--- a/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc
+++ b/chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_android.cc
@@ -43,10 +43,15 @@ DataReductionProxyResourceThrottleFactory::CreateResourceThrottle(
content::ResourceType resource_type,
SafeBrowsingService* service) {
#if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE)
+ // Send requests through Safe Browsing if we can't process them.
ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
if (io_data->IsOffTheRecord() || !io_data->IsDataReductionProxyEnabled() ||
- request->url().SchemeIsSecure())
- return new SafeBrowsingResourceThrottle(request, resource_type, service);
+ request->url().SchemeIsSecure()) {
+ // *this is already registered as the SafeBrowsingResourceThrottleFactory,
+ // so need to bypass that and use its base implementation.
+ return SafeBrowsingResourceThrottleFactory::CreateWithoutRegisteredFactory(
+ request, resource_type, service);
+ }
#endif
return new DataReductionProxyResourceThrottle(request, resource_type,
service);
« no previous file with comments | « no previous file | chrome/browser/renderer_host/safe_browsing_resource_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698