Chromium Code Reviews| 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 6cc7f6196f95a3832224a5332cb20df0b113cf6c..e59faa4d3534bc5fafce8fe6ecac7229e60d94bf 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" |
| @@ -1438,6 +1439,17 @@ scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::AddStandardHandlers( |
| plugin_service, request)); |
| ScopedVector<ResourceThrottle> throttles; |
| + |
| + // Add a NavigationResourceThrottle for navigations. |
| + // PlzNavigate: the thottle is unnecessary as communication with the UI |
|
davidben
2015/09/01 21:55:18
Nit: throttle
clamy
2015/09/03 15:30:52
Done.
|
| + // thread is handled by the NavigationURLloader. |
| + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableBrowserSideNavigation) && |
| + (resource_type == RESOURCE_TYPE_MAIN_FRAME || |
| + resource_type == RESOURCE_TYPE_SUB_FRAME)) { |
|
davidben
2015/09/01 21:55:18
IsResourceTypeFrame?
clamy
2015/09/03 15:30:52
Done.
|
| + throttles.push_back(new NavigationResourceThrottle(request)); |
| + } |
| + |
| if (delegate_) { |
| delegate_->RequestBeginning(request, |
| resource_context, |