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

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

Issue 25536005: Clean up ResourceHandler API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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
« no previous file with comments | « content/browser/loader/throttling_resource_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/throttling_resource_handler.cc
diff --git a/content/browser/loader/throttling_resource_handler.cc b/content/browser/loader/throttling_resource_handler.cc
index 8bb54467e2b9455e823ad115279fd56731a5ba3f..23f77da90cea7eaecbd1151be2187216a04e7697 100644
--- a/content/browser/loader/throttling_resource_handler.cc
+++ b/content/browser/loader/throttling_resource_handler.cc
@@ -4,7 +4,7 @@
#include "content/browser/loader/throttling_resource_handler.h"
-#include "content/public/browser/resource_request_info.h"
+#include "content/browser/loader/resource_request_info_impl.h"
#include "content/public/browser/resource_throttle.h"
#include "content/public/common/resource_response.h"
@@ -14,9 +14,8 @@ ThrottlingResourceHandler::ThrottlingResourceHandler(
scoped_ptr<ResourceHandler> next_handler,
net::URLRequest* request,
ScopedVector<ResourceThrottle> throttles)
- : LayeredResourceHandler(next_handler.Pass()),
+ : LayeredResourceHandler(request, next_handler.Pass()),
deferred_stage_(DEFERRED_NONE),
- request_(request),
throttles_(throttles.Pass()),
index_(0),
cancelled_by_resource_throttle_(false) {
@@ -141,8 +140,7 @@ void ThrottlingResourceHandler::ResumeStart() {
deferred_url_ = GURL();
bool defer = false;
- const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
- if (!OnWillStart(info->GetRequestID(), url, &defer)) {
+ if (!OnWillStart(GetRequestID(), url, &defer)) {
controller()->Cancel();
} else if (!defer) {
controller()->Resume();
@@ -158,9 +156,7 @@ void ThrottlingResourceHandler::ResumeRedirect() {
deferred_response_.swap(response);
bool defer = false;
- const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
- if (!OnRequestRedirected(info->GetRequestID(), new_url, response.get(),
- &defer)) {
+ if (!OnRequestRedirected(GetRequestID(), new_url, response.get(), &defer)) {
controller()->Cancel();
} else if (!defer) {
controller()->Resume();
@@ -174,8 +170,7 @@ void ThrottlingResourceHandler::ResumeResponse() {
deferred_response_.swap(response);
bool defer = false;
- const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
- if (!OnResponseStarted(info->GetRequestID(), response.get(), &defer)) {
+ if (!OnResponseStarted(GetRequestID(), response.get(), &defer)) {
controller()->Cancel();
} else if (!defer) {
controller()->Resume();
« no previous file with comments | « content/browser/loader/throttling_resource_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698