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

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

Issue 2526983002: Refactor ResourceHandler API. (Closed)
Patch Set: Fix stuff Created 4 years, 1 month 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 7bcf5e0bb86edf57181d3b36be9ccf3e989b08e8..d51ea46d420a1d5c2702ced674a0097bba922ffa 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -52,6 +52,7 @@
#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/null_resource_controller.h"
#include "content/browser/loader/power_save_block_resource_throttle.h"
#include "content/browser/loader/redirect_to_file_resource_handler.h"
#include "content/browser/loader/resource_loader.h"
@@ -2353,12 +2354,12 @@ void ResourceDispatcherHostImpl::BeginRequestInternal(
// status -- it has no effect beyond this, since the request hasn't started.
request->CancelWithError(net::ERR_INSUFFICIENT_RESOURCES);
- bool defer = false;
- handler->OnResponseCompleted(request->status(), &defer);
- if (defer) {
- // TODO(darin): The handler is not ready for us to kill the request. Oops!
- NOTREACHED();
- }
+ bool was_resumed = false;
+ handler->OnResponseCompleted(
+ request->status(),
+ base::MakeUnique<NullResourceController>(&was_resumed));
+ // TODO(darin): The handler is not ready for us to kill the request. Oops!
+ DCHECK(was_resumed);
IncrementOutstandingRequestsMemory(-1, *info);

Powered by Google App Engine
This is Rietveld 408576698