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

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: rebase + fix nits Created 8 years, 3 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::CancelAndIgnore() {
99 controller()->CancelAndIgnore();
100 }
101
98 void ThrottlingResourceHandler::Resume() { 102 void ThrottlingResourceHandler::Resume() {
99 switch (deferred_stage_) { 103 switch (deferred_stage_) {
100 case DEFERRED_NONE: 104 case DEFERRED_NONE:
101 NOTREACHED(); 105 NOTREACHED();
102 break; 106 break;
103 case DEFERRED_START: 107 case DEFERRED_START:
104 ResumeStart(); 108 ResumeStart();
105 break; 109 break;
106 case DEFERRED_REDIRECT: 110 case DEFERRED_REDIRECT:
107 ResumeRedirect(); 111 ResumeRedirect();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 149
146 bool defer = false; 150 bool defer = false;
147 if (!OnResponseStarted(request_id_, response, &defer)) { 151 if (!OnResponseStarted(request_id_, response, &defer)) {
148 controller()->Cancel(); 152 controller()->Cancel();
149 } else if (!defer) { 153 } else if (!defer) {
150 controller()->Resume(); 154 controller()->Resume();
151 } 155 }
152 } 156 }
153 157
154 } // namespace content 158 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/throttling_resource_handler.h ('k') | content/common/resource_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698