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

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

Issue 10693147: Merge 145731 - Remember to set did_defer_ to true when deferring the request from (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 DCHECK(!defer); // Since !has_started_response_. 141 DCHECK(!defer); // Since !has_started_response_.
142 } 142 }
143 143
144 // We have to buffer the call until after the transition completes. 144 // We have to buffer the call until after the transition completes.
145 completed_during_transition_ = true; 145 completed_during_transition_ = true;
146 completed_status_ = status; 146 completed_status_ = status;
147 completed_security_info_ = security_info; 147 completed_security_info_ = security_info;
148 148
149 // Return false to tell RDH not to notify the world or clean up the 149 // Return false to tell RDH not to notify the world or clean up the
150 // pending request. We will do so in ResumeResponse. 150 // pending request. We will do so in ResumeResponse.
151 did_defer_ = true;
151 return false; 152 return false;
152 } 153 }
153 154
154 // We can now send the response to the new renderer, which will cause 155 // We can now send the response to the new renderer, which will cause
155 // WebContentsImpl to swap in the new renderer and destroy the old one. 156 // WebContentsImpl to swap in the new renderer and destroy the old one.
156 void CrossSiteResourceHandler::ResumeResponse() { 157 void CrossSiteResourceHandler::ResumeResponse() {
157 DCHECK(request_id_ != -1); 158 DCHECK(request_id_ != -1);
158 DCHECK(in_cross_site_transition_); 159 DCHECK(in_cross_site_transition_);
159 in_cross_site_transition_ = false; 160 in_cross_site_transition_ = false;
160 161
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 243 }
243 244
244 void CrossSiteResourceHandler::ResumeIfDeferred() { 245 void CrossSiteResourceHandler::ResumeIfDeferred() {
245 if (did_defer_) { 246 if (did_defer_) {
246 did_defer_ = false; 247 did_defer_ = false;
247 controller()->Resume(); 248 controller()->Resume();
248 } 249 }
249 } 250 }
250 251
251 } // namespace content 252 } // 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