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

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

Issue 2972793002: Fix did_replace_entry reported as false for meta refresh tags (Closed)
Patch Set: Minor rewrite and updated tests. 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/History/redirector_slow.html ('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 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 881 }
882 } 882 }
883 883
884 switch (details->type) { 884 switch (details->type) {
885 case NAVIGATION_TYPE_NEW_PAGE: 885 case NAVIGATION_TYPE_NEW_PAGE:
886 RendererDidNavigateToNewPage(rfh, params, details->is_same_document, 886 RendererDidNavigateToNewPage(rfh, params, details->is_same_document,
887 details->did_replace_entry, 887 details->did_replace_entry,
888 navigation_handle); 888 navigation_handle);
889 break; 889 break;
890 case NAVIGATION_TYPE_EXISTING_PAGE: 890 case NAVIGATION_TYPE_EXISTING_PAGE:
891 details->did_replace_entry = details->is_same_document; 891 // In-page navigations always replace the previous entry. This is the
892 // case for history.replaceState(), as well as back and forward across
893 // fragment entries and history.pushState() entries.
894 if (details->is_same_document)
895 details->did_replace_entry = true;
896
892 RendererDidNavigateToExistingPage(rfh, params, details->is_same_document, 897 RendererDidNavigateToExistingPage(rfh, params, details->is_same_document,
893 was_restored, navigation_handle); 898 was_restored, navigation_handle);
894 break; 899 break;
895 case NAVIGATION_TYPE_SAME_PAGE: 900 case NAVIGATION_TYPE_SAME_PAGE:
896 RendererDidNavigateToSamePage(rfh, params, navigation_handle); 901 RendererDidNavigateToSamePage(rfh, params, navigation_handle);
897 break; 902 break;
898 case NAVIGATION_TYPE_NEW_SUBFRAME: 903 case NAVIGATION_TYPE_NEW_SUBFRAME:
899 RendererDidNavigateNewSubframe(rfh, params, details->is_same_document, 904 RendererDidNavigateNewSubframe(rfh, params, details->is_same_document,
900 details->did_replace_entry); 905 details->did_replace_entry);
901 break; 906 break;
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2247 DCHECK(pending_entry_index_ == -1 || 2252 DCHECK(pending_entry_index_ == -1 ||
2248 pending_entry_ == GetEntryAtIndex(pending_entry_index_)); 2253 pending_entry_ == GetEntryAtIndex(pending_entry_index_));
2249 } 2254 }
2250 2255
2251 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2256 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2252 const base::Callback<base::Time()>& get_timestamp_callback) { 2257 const base::Callback<base::Time()>& get_timestamp_callback) {
2253 get_timestamp_callback_ = get_timestamp_callback; 2258 get_timestamp_callback_ = get_timestamp_callback;
2254 } 2259 }
2255 2260
2256 } // namespace content 2261 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/data/History/redirector_slow.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698