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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Created 5 years, 4 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 5ddf0e8d3de684418977cc47122d768a4a5f362d..666d9167ec7da9d50a85f1c69f1a630c88ad5efa 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -341,22 +341,8 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
#if defined(OS_ANDROID)
// TODO(davidben): This is insufficient to integrate with prerender properly.
// https://crbug.com/370595
- if (!is_prerendering) {
- if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
- throttles->push_back(
- InterceptNavigationDelegate::CreateThrottleFor(request));
- } else {
- InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request);
- }
- }
-#else
- if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
- // Redirect some navigations to apps that have registered matching URL
- // handlers ('url_handlers' in the manifest).
- content::ResourceThrottle* url_to_app_throttle =
- AppUrlRedirector::MaybeCreateThrottleFor(request, io_data);
- if (url_to_app_throttle)
- throttles->push_back(url_to_app_throttle);
+ if (!is_prerendering && resource_type != content::RESOURCE_TYPE_MAIN_FRAME) {
+ InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request);
davidben 2015/09/01 21:55:17 [This is probably for a separate CL, but... wow, t
clamy 2015/09/03 15:30:51 Done.
}
#endif

Powered by Google App Engine
This is Rietveld 408576698