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

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

Issue 10578055: Rewrite guts of ResourceLoader and BufferedResourceHandler to suck less. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 <string> 5 #include <string>
6 6
7 #include "content/browser/renderer_host/cross_site_resource_handler.h" 7 #include "content/browser/renderer_host/cross_site_resource_handler.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return next_handler_->OnResponseStarted(request_id, response, defer); 97 return next_handler_->OnResponseStarted(request_id, response, defer);
98 } 98 }
99 99
100 // Tell the renderer to run the onunload event handler, and wait for the 100 // Tell the renderer to run the onunload event handler, and wait for the
101 // reply. 101 // reply.
102 StartCrossSiteTransition(request_id, response, defer); 102 StartCrossSiteTransition(request_id, response, defer);
103 return true; 103 return true;
104 } 104 }
105 105
106 bool CrossSiteResourceHandler::OnReadCompleted(int request_id, 106 bool CrossSiteResourceHandler::OnReadCompleted(int request_id,
107 int* bytes_read, 107 int bytes_read,
108 bool* defer) { 108 bool* defer) {
109 if (!in_cross_site_transition_) { 109 if (!in_cross_site_transition_) {
110 return next_handler_->OnReadCompleted(request_id, bytes_read, defer); 110 return next_handler_->OnReadCompleted(request_id, bytes_read, defer);
111 } 111 }
112 return true; 112 return true;
113 } 113 }
114 114
115 bool CrossSiteResourceHandler::OnResponseCompleted( 115 bool CrossSiteResourceHandler::OnResponseCompleted(
116 int request_id, 116 int request_id,
117 const net::URLRequestStatus& status, 117 const net::URLRequestStatus& status,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 222
223 void CrossSiteResourceHandler::ResumeIfDeferred() { 223 void CrossSiteResourceHandler::ResumeIfDeferred() {
224 if (did_defer_) { 224 if (did_defer_) {
225 did_defer_ = false; 225 did_defer_ = false;
226 controller()->Resume(); 226 controller()->Resume();
227 } 227 }
228 } 228 }
229 229
230 } // namespace content 230 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/cross_site_resource_handler.h ('k') | content/browser/renderer_host/doomed_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698