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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 2413663003: Expose GlobalRequestID in NavigationHandle and ResourceRequestInfo. (Closed)
Patch Set: Use OnURLRequestDestroyed Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index e174e54d379ca834c1016b919b53d5325fb0ce0d..a68a49f89f983b31492fbd793ce679094ce48a6b 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -7,7 +7,9 @@
#include <stddef.h>
#include <algorithm>
+#include <string>
#include <utility>
+#include <vector>
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
@@ -284,7 +286,7 @@ RenderFrameHostImpl* RenderFrameHostManager::Navigate(
// the destination render frame will take ownership, so release ownership of
// the transferring NavigationHandle.
if (transfer_navigation_handle_.get() &&
- transfer_navigation_handle_->request_id() ==
+ transfer_navigation_handle_->GetGlobalRequestID() ==
entry.transferred_global_request_id()) {
// The navigating RenderFrameHost should take ownership of the
// NavigationHandle that came from the transferring RenderFrameHost.
@@ -2276,7 +2278,8 @@ RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
// This ensures the network request will not be destroyed along the pending
// RFH but will persist until it is picked up by the new RFH.
if (transfer_navigation_handle_.get() &&
- transfer_navigation_handle_->request_id() == transferred_request_id &&
+ transfer_navigation_handle_->GetGlobalRequestID() ==
+ transferred_request_id &&
new_instance.get() !=
transfer_navigation_handle_->GetRenderFrameHost()
->GetSiteInstance()) {
@@ -2343,7 +2346,7 @@ RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate(
// We don't need to stop the old renderer or run beforeunload/unload
// handlers, because those have already been done.
DCHECK(transfer_navigation_handle_ &&
- transfer_navigation_handle_->request_id() ==
+ transfer_navigation_handle_->GetGlobalRequestID() ==
transferred_request_id);
} else if (!pending_render_frame_host_->are_navigations_suspended()) {
// If the pending RFH hasn't already been suspended from a previous
@@ -2470,7 +2473,7 @@ std::unique_ptr<RenderFrameHostImpl> RenderFrameHostManager::SetRenderFrameHost(
}
RenderViewHostImpl* RenderFrameHostManager::GetSwappedOutRenderViewHost(
- SiteInstance* instance) const {
+ SiteInstance* instance) const {
RenderFrameProxyHost* proxy = GetRenderFrameProxyHost(instance);
if (proxy)
return proxy->GetRenderViewHost();
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.cc ('k') | content/browser/loader/resource_request_info_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698