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

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

Issue 10702120: Remember to set did_defer_ to true when deferring the request from (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
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 StartCrossSiteTransition(request_id, NULL); 132 StartCrossSiteTransition(request_id, NULL);
133 } 133 }
134 134
135 // We have to buffer the call until after the transition completes. 135 // We have to buffer the call until after the transition completes.
136 completed_during_transition_ = true; 136 completed_during_transition_ = true;
137 completed_status_ = status; 137 completed_status_ = status;
138 completed_security_info_ = security_info; 138 completed_security_info_ = security_info;
139 139
140 // Return false to tell RDH not to notify the world or clean up the 140 // Return false to tell RDH not to notify the world or clean up the
141 // pending request. We will do so in ResumeResponse. 141 // pending request. We will do so in ResumeResponse.
142 did_defer_ = true;
142 return false; 143 return false;
143 } 144 }
144 145
145 // We can now send the response to the new renderer, which will cause 146 // We can now send the response to the new renderer, which will cause
146 // WebContentsImpl to swap in the new renderer and destroy the old one. 147 // WebContentsImpl to swap in the new renderer and destroy the old one.
147 void CrossSiteResourceHandler::ResumeResponse() { 148 void CrossSiteResourceHandler::ResumeResponse() {
148 DCHECK(request_id_ != -1); 149 DCHECK(request_id_ != -1);
149 DCHECK(in_cross_site_transition_); 150 DCHECK(in_cross_site_transition_);
150 in_cross_site_transition_ = false; 151 in_cross_site_transition_ = false;
151 152
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 210 }
210 211
211 void CrossSiteResourceHandler::ResumeIfDeferred() { 212 void CrossSiteResourceHandler::ResumeIfDeferred() {
212 if (did_defer_) { 213 if (did_defer_) {
213 did_defer_ = false; 214 did_defer_ = false;
214 controller()->Resume(); 215 controller()->Resume();
215 } 216 }
216 } 217 }
217 218
218 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698