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

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

Issue 1661423002: Solidify Entry discarding logic (NavigationHandle keeps its ID) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't initialize NavigationHandle with base url for data url Created 4 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
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/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 bad_message::ReceivedBadMessage( 999 bad_message::ReceivedBadMessage(
1000 GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE); 1000 GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE);
1001 return; 1001 return;
1002 } 1002 }
1003 1003
1004 // If the URL does not match what the NavigationHandle expects, treat the 1004 // If the URL does not match what the NavigationHandle expects, treat the
1005 // commit as a new navigation. This can happen if an ongoing slow 1005 // commit as a new navigation. This can happen if an ongoing slow
1006 // same-process navigation is interrupted by a synchronous renderer-initiated 1006 // same-process navigation is interrupted by a synchronous renderer-initiated
1007 // navigation. 1007 // navigation.
1008 if (navigation_handle_ && 1008 if (navigation_handle_ &&
1009 navigation_handle_->GetURL() != validated_params.url) { 1009 (navigation_handle_->GetURL() != validated_params.url)) {
Charlie Reis 2016/02/16 21:55:07 This change doesn't seem necessary, but I don't fe
Charlie Harrison 2016/02/16 22:55:23 Removed.
1010 navigation_handle_.reset(); 1010 navigation_handle_.reset();
1011 } 1011 }
1012 1012
1013 // Synchronous renderer-initiated navigations will send a 1013 // Synchronous renderer-initiated navigations will send a
1014 // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad 1014 // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad
1015 // message. 1015 // message.
1016 if (!navigation_handle_) { 1016 if (!navigation_handle_) {
1017 // There is no pending NavigationEntry in these cases, so pass 0 as the
1018 // nav_id.
1017 navigation_handle_ = 1019 navigation_handle_ =
1018 NavigationHandleImpl::Create(validated_params.url, frame_tree_node_, 1020 NavigationHandleImpl::Create(validated_params.url, frame_tree_node_,
1019 true, // is_synchronous 1021 true, // is_synchronous
1020 validated_params.is_srcdoc, 1022 validated_params.is_srcdoc,
1021 base::TimeTicks::Now()); 1023 base::TimeTicks::Now(),
1024 0);
Charlie Reis 2016/02/16 21:55:07 nit: This fits on the previous line. Call sites d
Charlie Harrison 2016/02/16 22:55:22 Done.
1022 } 1025 }
1023 1026
1024 accessibility_reset_count_ = 0; 1027 accessibility_reset_count_ = 0;
1025 frame_tree_node()->navigator()->DidNavigate(this, validated_params); 1028 frame_tree_node()->navigator()->DidNavigate(this, validated_params);
1026 1029
1027 // For a top-level frame, there are potential security concerns associated 1030 // For a top-level frame, there are potential security concerns associated
1028 // with displaying graphics from a previously loaded page after the URL in 1031 // with displaying graphics from a previously loaded page after the URL in
1029 // the omnibar has been changed. It is unappealing to clear the page 1032 // the omnibar has been changed. It is unappealing to clear the page
1030 // immediately, but if the renderer is taking a long time to issue any 1033 // immediately, but if the renderer is taking a long time to issue any
1031 // compositor output (possibly because of script deliberately creating this 1034 // compositor output (possibly because of script deliberately creating this
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 *dst = src; 2568 *dst = src;
2566 2569
2567 if (src.routing_id != -1) 2570 if (src.routing_id != -1)
2568 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2571 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2569 2572
2570 if (src.parent_routing_id != -1) 2573 if (src.parent_routing_id != -1)
2571 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2574 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2572 } 2575 }
2573 2576
2574 } // namespace content 2577 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698