Index: content/browser/loader/resource_dispatcher_host_impl.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
index c069469500101112a421f3eec8d950d7c1de9a40..1b7414704aa5e75c32f8a2fbbdd56943d4d115ed 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.cc |
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
@@ -41,6 +41,7 @@ |
#include "content/browser/loader/detachable_resource_handler.h" |
#include "content/browser/loader/mime_type_resource_handler.h" |
#include "content/browser/loader/navigation_resource_handler.h" |
+#include "content/browser/loader/navigation_resource_throttle.h" |
#include "content/browser/loader/navigation_url_loader_impl_core.h" |
#include "content/browser/loader/power_save_block_resource_throttle.h" |
#include "content/browser/loader/redirect_to_file_resource_handler.h" |
@@ -1480,6 +1481,16 @@ scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::AddStandardHandlers( |
plugin_service, request)); |
ScopedVector<ResourceThrottle> throttles; |
+ |
+ // Add a NavigationResourceThrottle for navigations. |
+ // PlzNavigate: the throttle is unnecessary as communication with the UI |
+ // thread is handled by the NavigationURLloader. |
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableBrowserSideNavigation) && |
+ IsResourceTypeFrame(resource_type)) { |
+ throttles.push_back(new NavigationResourceThrottle(request)); |
+ } |
+ |
if (delegate_) { |
delegate_->RequestBeginning(request, |
resource_context, |