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

Unified Diff: chrome/browser/history/history_tab_helper.cc

Issue 2949023002: [WIP] Fix history.replaceState() not propagating back favicons (Closed)
Patch Set: Focus on history.replaceState() 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
Index: chrome/browser/history/history_tab_helper.cc
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index ca6c1bd76f0ce6484ca91c23e13fb382f0cb1ae5..bc390d7d7d4b8827dd8160b000d49a8646516320 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -78,11 +78,14 @@ HistoryTabHelper::CreateHistoryAddPageArgs(
history::HistoryAddPageArgs add_page_args(
navigation_handle->GetURL(), timestamp,
- history::ContextIDForWebContents(web_contents()),
- nav_entry_id, navigation_handle->GetReferrer().url,
+ history::ContextIDForWebContents(web_contents()), nav_entry_id,
+ navigation_handle->GetReferrer().url,
navigation_handle->GetRedirectChain(),
navigation_handle->GetPageTransition(), history::SOURCE_BROWSED,
- navigation_handle->DidReplaceEntry(), consider_for_ntp_most_visited);
+ navigation_handle->DidReplaceEntry()
+ ? base::Optional<GURL>(navigation_handle->GetPreviousURL())
+ : base::nullopt,
+ consider_for_ntp_most_visited);
if (ui::PageTransitionIsMainFrame(navigation_handle->GetPageTransition()) &&
virtual_url != navigation_handle->GetURL()) {
// Hack on the "virtual" URL so that it will appear in history. For some

Powered by Google App Engine
This is Rietveld 408576698