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

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

Issue 2032903007: Allow about:blank to be considered in-page if origin matches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add document.close() to tests. Created 4 years, 6 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 | « content/browser/frame_host/navigation_controller_impl_unittest.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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) { 469 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
470 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree(); 470 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree();
471 bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible(); 471 bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible();
472 472
473 bool has_embedded_credentials = 473 bool has_embedded_credentials =
474 params.url.has_username() || params.url.has_password(); 474 params.url.has_username() || params.url.has_password();
475 UMA_HISTOGRAM_BOOLEAN("Navigation.FrameHasEmbeddedCredentials", 475 UMA_HISTOGRAM_BOOLEAN("Navigation.FrameHasEmbeddedCredentials",
476 has_embedded_credentials); 476 has_embedded_credentials);
477 477
478 bool is_navigation_within_page = controller_->IsURLInPageNavigation( 478 bool is_navigation_within_page = controller_->IsURLInPageNavigation(
479 params.url, params.was_within_same_page, render_frame_host); 479 params.url, params.origin, params.was_within_same_page,
480 render_frame_host);
480 481
481 // If a frame claims it navigated within page, it must be the current frame, 482 // If a frame claims it navigated within page, it must be the current frame,
482 // not a pending one. 483 // not a pending one.
483 if (is_navigation_within_page && 484 if (is_navigation_within_page &&
484 render_frame_host != 485 render_frame_host !=
485 render_frame_host->frame_tree_node() 486 render_frame_host->frame_tree_node()
486 ->render_manager() 487 ->render_manager()
487 ->current_frame_host()) { 488 ->current_frame_host()) {
488 bad_message::ReceivedBadMessage(render_frame_host->GetProcess(), 489 bad_message::ReceivedBadMessage(render_frame_host->GetProcess(),
489 bad_message::NI_IN_PAGE_NAVIGATION); 490 bad_message::NI_IN_PAGE_NAVIGATION);
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 if (pending_entry != controller_->GetVisibleEntry() || 1174 if (pending_entry != controller_->GetVisibleEntry() ||
1174 !should_preserve_entry) { 1175 !should_preserve_entry) {
1175 controller_->DiscardPendingEntry(true); 1176 controller_->DiscardPendingEntry(true);
1176 1177
1177 // Also force the UI to refresh. 1178 // Also force the UI to refresh.
1178 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1179 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1179 } 1180 }
1180 } 1181 }
1181 1182
1182 } // namespace content 1183 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698