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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2961903003: PageTransition: Remove unreached code. (Closed)
Patch Set: Add TODO (and rebase) Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index b5ab78a924f93185e62d70a93a157d4446d7dd95..af21e9e8a293641de5d207cf8eba4a9666ddb48a 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4931,20 +4931,7 @@ void RenderFrameImpl::SendDidCommitProvisionalLoad(
params.contents_mime_type = ds->GetResponse().MimeType().Utf8();
params.transition = navigation_state->GetTransitionType();
- if (!ui::PageTransitionIsMainFrame(params.transition)) {
- // If the main frame does a load, it should not be reported as a subframe
- // navigation. This can occur in the following case:
- // 1. You're on a site with frames.
- // 2. You do a subframe navigation. This is stored with transition type
- // MANUAL_SUBFRAME.
- // 3. You navigate to some non-frame site, say, google.com.
- // 4. You navigate back to the page from step 2. Since it was initially
- // MANUAL_SUBFRAME, it will be that same transition type here.
- // We don't want that, because any navigation that changes the toplevel
- // frame should be tracked as a toplevel navigation (this allows us to
- // update the URL bar, etc).
- params.transition = ui::PAGE_TRANSITION_LINK;
- }
+ DCHECK(ui::PageTransitionIsMainFrame(params.transition));
// If the page contained a client redirect (meta refresh, document.loc...),
// set the transition appropriately.
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698