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

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

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed chromeos build issue + rebase Created 8 years, 6 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 a5153ddf598fbd906c59ed39cff38f70485bf06b..33741465331a757fd7a7e4456848f745eb0327ce 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -46,6 +46,8 @@
// TODO(oshima): Enable this for other platforms.
joth 2012/06/13 22:32:49 nit: either move this TODO inside the #if, or spli
mkosiba (inactive) 2012/06/15 11:05:36 Done.
#if defined(OS_CHROMEOS)
#include "chrome/browser/renderer_host/offline_resource_throttle.h"
+#elif defined(OS_ANDROID)
+#include "content/public/browser/intercept_navigation_resource_throttle.h"
#endif
using content::BrowserThread;
@@ -132,14 +134,17 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
request->set_priority(net::IDLE);
}
-#if defined(OS_CHROMEOS)
if (resource_type == ResourceType::MAIN_FRAME) {
+#if defined(OS_CHROMEOS)
// We check offline first, then check safe browsing so that we still can
// block unsafe site after we remove offline page.
throttles->push_back(new OfflineResourceThrottle(
child_id, route_id, request, resource_context));
- }
+#elif defined(OS_ANDROID)
joth 2012/06/13 22:32:49 again would be tempted to do these as unconnected
mkosiba (inactive) 2012/06/15 11:05:36 No logical reason to not have the 2 throttles toge
+ throttles->push_back(
+ content::InterceptNavigationResourceThrottle::Create(request));
#endif
+ }
AppendChromeMetricsHeaders(request, resource_context, resource_type);

Powered by Google App Engine
This is Rietveld 408576698