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

Side by Side Diff: content/browser/renderer_host/throttling_resource_handler.cc

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: revert removing DCHECK from URLRequest::DoCancel Created 8 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/throttling_resource_handler.h" 5 #include "content/browser/renderer_host/throttling_resource_handler.h"
6 6
7 #include "content/public/browser/resource_throttle.h" 7 #include "content/public/browser/resource_throttle.h"
8 #include "content/public/common/resource_response.h" 8 #include "content/public/common/resource_response.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 index_ = 0; // Reset for next time. 89 index_ = 0; // Reset for next time.
90 90
91 return next_handler_->OnResponseStarted(request_id, response, defer); 91 return next_handler_->OnResponseStarted(request_id, response, defer);
92 } 92 }
93 93
94 void ThrottlingResourceHandler::Cancel() { 94 void ThrottlingResourceHandler::Cancel() {
95 controller()->Cancel(); 95 controller()->Cancel();
96 } 96 }
97 97
98 void ThrottlingResourceHandler::CancelWithError(int error) {
99 controller()->CancelWithError(error);
100 }
101
102 void ThrottlingResourceHandler::HandledExternally() {
103 controller()->HandledExternally();
104 }
105
98 void ThrottlingResourceHandler::Resume() { 106 void ThrottlingResourceHandler::Resume() {
99 switch (deferred_stage_) { 107 switch (deferred_stage_) {
100 case DEFERRED_NONE: 108 case DEFERRED_NONE:
101 NOTREACHED(); 109 NOTREACHED();
102 break; 110 break;
103 case DEFERRED_START: 111 case DEFERRED_START:
104 ResumeStart(); 112 ResumeStart();
105 break; 113 break;
106 case DEFERRED_REDIRECT: 114 case DEFERRED_REDIRECT:
107 ResumeRedirect(); 115 ResumeRedirect();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 153
146 bool defer = false; 154 bool defer = false;
147 if (!OnResponseStarted(request_id_, response, &defer)) { 155 if (!OnResponseStarted(request_id_, response, &defer)) {
148 controller()->Cancel(); 156 controller()->Cancel();
149 } else if (!defer) { 157 } else if (!defer) {
150 controller()->Resume(); 158 controller()->Resume();
151 } 159 }
152 } 160 }
153 161
154 } // namespace content 162 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698