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

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

Issue 2264633003: Workaround for reading bad PageState from session history. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « components/sessions/content/content_serialized_navigation_builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { 965 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) {
966 if (params.is_history_navigation_in_new_child) { 966 if (params.is_history_navigation_in_new_child) {
967 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); 967 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
968 968
969 // Try to find a FrameNavigationEntry that matches this frame instead, based 969 // Try to find a FrameNavigationEntry that matches this frame instead, based
970 // on the frame's unique name. If this can't be found, fall back to the 970 // on the frame's unique name. If this can't be found, fall back to the
971 // default params using OpenURL below. 971 // default params using OpenURL below.
972 if (frame_tree_node_->navigator()->NavigateNewChildFrame( 972 if (frame_tree_node_->navigator()->NavigateNewChildFrame(
973 this, params.frame_unique_name)) 973 this, params.frame_unique_name))
974 return; 974 return;
975
976 // No need to explicitly load about:blank, since we start there anyway.
977 if (params.url == GURL(url::kAboutBlankURL)) {
978 // TODO(creis): Do we need to stop loading in the frame?
979 DLOG(INFO) << "Skipping OpenURL for fallback to about:blank";
980 return;
981 }
975 } 982 }
976 983
977 OpenURL(params, GetSiteInstance()); 984 OpenURL(params, GetSiteInstance());
978 } 985 }
979 986
980 void RenderFrameHostImpl::OnCancelInitialHistoryLoad() { 987 void RenderFrameHostImpl::OnCancelInitialHistoryLoad() {
981 // A Javascript navigation interrupted the initial history load. Check if an 988 // A Javascript navigation interrupted the initial history load. Check if an
982 // initial subframe cross-process navigation needs to be canceled as a result. 989 // initial subframe cross-process navigation needs to be canceled as a result.
983 // TODO(creis, clamy): Cancel any cross-process navigation in PlzNavigate. 990 // TODO(creis, clamy): Cancel any cross-process navigation in PlzNavigate.
984 if (GetParent() && !frame_tree_node_->has_committed_real_load() && 991 if (GetParent() && !frame_tree_node_->has_committed_real_load() &&
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3053 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3047 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3054 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3048 return web_bluetooth_service_.get(); 3055 return web_bluetooth_service_.get();
3049 } 3056 }
3050 3057
3051 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3058 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3052 web_bluetooth_service_.reset(); 3059 web_bluetooth_service_.reset();
3053 } 3060 }
3054 3061
3055 } // namespace content 3062 } // namespace content
OLDNEW
« no previous file with comments | « components/sessions/content/content_serialized_navigation_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698