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

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

Issue 147145: Fix: Certain redirections remove sites from the history... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
===================================================================
--- chrome/browser/history/history_backend.cc (revision 19705)
+++ chrome/browser/history/history_backend.cc (working copy)
@@ -402,12 +402,13 @@
DCHECK(request->referrer == request->redirects[0]);
request->redirects.erase(request->redirects.begin());
- // Make sure to remove the CHAIN_END marker from the first visit. This
+ // If the navigation entry for this visit has replaced that for the
+ // first visit, remove the CHAIN_END marker from the first visit. This
// can be called a lot, for example, the page cycler, and most of the
// time we won't have changed anything.
- // TODO(brettw) this should be unit tested.
VisitRow visit_row;
- if (db_->GetRowForVisit(last_ids.second, &visit_row) &&
+ if (request->did_replace_entry &&
+ db_->GetRowForVisit(last_ids.second, &visit_row) &&
visit_row.transition | PageTransition::CHAIN_END) {
visit_row.transition &= ~PageTransition::CHAIN_END;
db_->UpdateVisitRow(visit_row);
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698