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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2005273002: Move MimeTypeResourceHandler before ThrottlingResourceHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to one class Created 4 years, 7 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: 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 da256df980413b76fe334efae34d9216b3394399..f8892f937a8d2d097afc7517ff6a6f351c586346 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1720,14 +1720,6 @@ ResourceDispatcherHostImpl::AddStandardHandlers(
return handler;
}
- PluginService* plugin_service = nullptr;
-#if defined(ENABLE_PLUGINS)
- plugin_service = PluginService::GetInstance();
-#endif
- // Insert a buffered event handler before the actual one.
- handler.reset(new MimeTypeResourceHandler(std::move(handler), this,
- plugin_service, request));
-
ScopedVector<ResourceThrottle> throttles;
// Add a NavigationResourceThrottle for navigations.
@@ -1758,6 +1750,15 @@ ResourceDispatcherHostImpl::AddStandardHandlers(
handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
std::move(throttles)));
+ PluginService* plugin_service = nullptr;
+#if defined(ENABLE_PLUGINS)
+ plugin_service = PluginService::GetInstance();
+#endif
+
+ // Insert a buffered event handler to sniff the mime type first.
+ handler.reset(new MimeTypeResourceHandler(std::move(handler), this,
+ plugin_service, request));
+
return handler;
}

Powered by Google App Engine
This is Rietveld 408576698