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

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

Issue 187843005: Remove stale frame ID references for RequestTransferURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove incorrect check. Created 6 years, 9 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 // TODO(creis): The blank swapped out page is visible during this time, but 320 // TODO(creis): The blank swapped out page is visible during this time, but
321 // we can shorten this by delivering the response directly, rather than 321 // we can shorten this by delivering the response directly, rather than
322 // forcing an identical request to be made. 322 // forcing an identical request to be made.
323 if (pending_nav_params_->cross_site_transferring_request) { 323 if (pending_nav_params_->cross_site_transferring_request) {
324 // Treat the last URL in the chain as the destination and the remainder as 324 // Treat the last URL in the chain as the destination and the remainder as
325 // the redirect chain. 325 // the redirect chain.
326 CHECK(pending_nav_params_->transfer_url_chain.size()); 326 CHECK(pending_nav_params_->transfer_url_chain.size());
327 GURL transfer_url = pending_nav_params_->transfer_url_chain.back(); 327 GURL transfer_url = pending_nav_params_->transfer_url_chain.back();
328 pending_nav_params_->transfer_url_chain.pop_back(); 328 pending_nav_params_->transfer_url_chain.pop_back();
329 329
330 // We use GetMainFrame here because this version of SwappedOut is only
331 // called for the main frame. We will remove it in favor of the frame
332 // specific version.
330 RenderFrameHostImpl* render_frame_host = 333 RenderFrameHostImpl* render_frame_host =
331 static_cast<RenderFrameHostImpl*>(render_view_host->GetMainFrame()); 334 static_cast<RenderFrameHostImpl*>(render_view_host->GetMainFrame());
332 335
333 // We don't know whether the original request had |user_action| set to true. 336 // We don't know whether the original request had |user_action| set to true.
334 // However, since we force the navigation to be in the current tab, it 337 // However, since we force the navigation to be in the current tab, it
335 // doesn't matter. 338 // doesn't matter.
336 render_frame_host->frame_tree_node()->navigator()->RequestTransferURL( 339 render_frame_host->frame_tree_node()->navigator()->RequestTransferURL(
337 render_frame_host, 340 render_frame_host,
338 transfer_url, 341 transfer_url,
339 pending_nav_params_->transfer_url_chain, 342 pending_nav_params_->transfer_url_chain,
340 pending_nav_params_->referrer, 343 pending_nav_params_->referrer,
341 pending_nav_params_->page_transition, 344 pending_nav_params_->page_transition,
342 CURRENT_TAB, 345 CURRENT_TAB,
343 pending_nav_params_->render_frame_id,
344 pending_nav_params_->global_request_id, 346 pending_nav_params_->global_request_id,
345 pending_nav_params_->should_replace_current_entry, 347 pending_nav_params_->should_replace_current_entry,
346 true); 348 true);
347 } else if (pending_render_frame_host_) { 349 } else if (pending_render_frame_host_) {
348 RenderProcessHostImpl* pending_process = 350 RenderProcessHostImpl* pending_process =
349 static_cast<RenderProcessHostImpl*>( 351 static_cast<RenderProcessHostImpl*>(
350 pending_render_frame_host_->GetProcess()); 352 pending_render_frame_host_->GetProcess());
351 pending_process->ResumeDeferredNavigation( 353 pending_process->ResumeDeferredNavigation(
352 pending_nav_params_->global_request_id); 354 pending_nav_params_->global_request_id);
353 } 355 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // We don't know whether the original request had |user_action| set to true. 388 // We don't know whether the original request had |user_action| set to true.
387 // However, since we force the navigation to be in the current tab, it 389 // However, since we force the navigation to be in the current tab, it
388 // doesn't matter. 390 // doesn't matter.
389 render_frame_host_->frame_tree_node()->navigator()->RequestTransferURL( 391 render_frame_host_->frame_tree_node()->navigator()->RequestTransferURL(
390 render_frame_host, 392 render_frame_host,
391 transfer_url, 393 transfer_url,
392 pending_nav_params_->transfer_url_chain, 394 pending_nav_params_->transfer_url_chain,
393 pending_nav_params_->referrer, 395 pending_nav_params_->referrer,
394 pending_nav_params_->page_transition, 396 pending_nav_params_->page_transition,
395 CURRENT_TAB, 397 CURRENT_TAB,
396 pending_nav_params_->render_frame_id,
397 pending_nav_params_->global_request_id, 398 pending_nav_params_->global_request_id,
398 false, 399 false,
399 true); 400 true);
400 } else if (pending_render_frame_host_) { 401 } else if (pending_render_frame_host_) {
401 RenderProcessHostImpl* pending_process = 402 RenderProcessHostImpl* pending_process =
402 static_cast<RenderProcessHostImpl*>( 403 static_cast<RenderProcessHostImpl*>(
403 pending_render_frame_host_->GetProcess()); 404 pending_render_frame_host_->GetProcess());
404 pending_process->ResumeDeferredNavigation( 405 pending_process->ResumeDeferredNavigation(
405 pending_nav_params_->global_request_id); 406 pending_nav_params_->global_request_id);
406 } 407 }
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 SiteInstance* instance) const { 1470 SiteInstance* instance) const {
1470 RenderFrameHostMap::const_iterator iter = 1471 RenderFrameHostMap::const_iterator iter =
1471 swapped_out_hosts_.find(instance->GetId()); 1472 swapped_out_hosts_.find(instance->GetId());
1472 if (iter != swapped_out_hosts_.end()) 1473 if (iter != swapped_out_hosts_.end())
1473 return iter->second; 1474 return iter->second;
1474 1475
1475 return NULL; 1476 return NULL;
1476 } 1477 }
1477 1478
1478 } // namespace content 1479 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698