Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 RenderFrameHostImpl* render_frame_host, | 468 RenderFrameHostImpl* render_frame_host, |
| 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( |
|
Charlie Reis
2016/06/06 19:30:54
I also plan to make this the only call site of IsU
Avi (use Gerrit)
2016/06/06 19:46:41
Acknowledged.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |