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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 172063002: Unify frame IDs with RenderFrameHost routing IDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix type Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Make sure this is from our current RFH, and that we have a pending 320 // Make sure this is from our current RFH, and that we have a pending
321 // navigation from OnCrossSiteResponse. (There may be no pending navigation 321 // navigation from OnCrossSiteResponse. (There may be no pending navigation
322 // for data URLs that don't make network requests, for example.) If not, 322 // for data URLs that don't make network requests, for example.) If not,
323 // just return early and ignore. 323 // just return early and ignore.
324 if (render_frame_host != render_frame_host_ || !pending_nav_params_.get()) { 324 if (render_frame_host != render_frame_host_ || !pending_nav_params_.get()) {
325 pending_nav_params_.reset(); 325 pending_nav_params_.reset();
326 return; 326 return;
327 } 327 }
328 328
329 // Sanity check that this is for the correct frame. 329 // Sanity check that this is for the correct frame.
330 DCHECK_EQ(frame_tree_node_->frame_id(), pending_nav_params_->frame_id); 330 DCHECK_EQ(frame_tree_node_->current_frame_host()->GetRoutingID(),
331 pending_nav_params_->frame_id);
332 DCHECK_EQ(frame_tree_node_->current_frame_host()->GetProcess()->GetID(),
333 pending_nav_params_->global_request_id.child_id);
331 334
332 // Now that the unload handler has run, we need to either initiate the 335 // Now that the unload handler has run, we need to either initiate the
333 // pending transfer (if there is one) or resume the paused response (if not). 336 // pending transfer (if there is one) or resume the paused response (if not).
334 // TODO(creis): The blank swapped out page is visible during this time, but 337 // TODO(creis): The blank swapped out page is visible during this time, but
335 // we can shorten this by delivering the response directly, rather than 338 // we can shorten this by delivering the response directly, rather than
336 // forcing an identical request to be made. 339 // forcing an identical request to be made.
337 if (pending_nav_params_->cross_site_transferring_request) { 340 if (pending_nav_params_->cross_site_transferring_request) {
338 // Treat the last URL in the chain as the destination and the remainder as 341 // Treat the last URL in the chain as the destination and the remainder as
339 // the redirect chain. 342 // the redirect chain.
340 CHECK(pending_nav_params_->transfer_url_chain.size()); 343 CHECK(pending_nav_params_->transfer_url_chain.size());
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 SiteInstance* instance) const { 1456 SiteInstance* instance) const {
1454 RenderFrameHostMap::const_iterator iter = 1457 RenderFrameHostMap::const_iterator iter =
1455 swapped_out_hosts_.find(instance->GetId()); 1458 swapped_out_hosts_.find(instance->GetId());
1456 if (iter != swapped_out_hosts_.end()) 1459 if (iter != swapped_out_hosts_.end())
1457 return iter->second; 1460 return iter->second;
1458 1461
1459 return NULL; 1462 return NULL;
1460 } 1463 }
1461 1464
1462 } // namespace content 1465 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698