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

Unified Diff: components/history/core/browser/expire_history_backend.cc

Issue 1011943003: Don't treat back/forwards as typed transitions in history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests Created 5 years, 9 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: components/history/core/browser/expire_history_backend.cc
diff --git a/components/history/core/browser/expire_history_backend.cc b/components/history/core/browser/expire_history_backend.cc
index e115f84eeead8f54f81c07e9ec2737321d499022..30eccf5e6b84e5d4d282d27bcb974154ef59c860 100644
--- a/components/history/core/browser/expire_history_backend.cc
+++ b/components/history/core/browser/expire_history_backend.cc
@@ -386,16 +386,14 @@ void ExpireHistoryBackend::ExpireURLsForVisits(const VisitVector& visits,
for (size_t i = 0; i < visits.size(); i++) {
ChangedURL& cur = changed_urls[visits[i].url_id];
// NOTE: This code must stay in sync with HistoryBackend::AddPageVisit().
- // TODO(pkasting): http://b/1148304 We shouldn't be marking so many URLs as
- // typed, which would help eliminate the need for this code (we still would
- // need to handle RELOAD transitions specially, though).
ui::PageTransition transition =
ui::PageTransitionStripQualifier(visits[i].transition);
if (transition != ui::PAGE_TRANSITION_RELOAD)
cur.visit_count++;
- if ((transition == ui::PAGE_TRANSITION_TYPED &&
- !ui::PageTransitionIsRedirect(visits[i].transition)) ||
- transition == ui::PAGE_TRANSITION_KEYWORD_GENERATED)
+ if (ui::PageTransitionIsNewNavigation(visits[i].transition) &&
+ ((transition == ui::PAGE_TRANSITION_TYPED &&
+ !ui::PageTransitionIsRedirect(visits[i].transition)) ||
+ transition == ui::PAGE_TRANSITION_KEYWORD_GENERATED))
cur.typed_count++;
}
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | components/history/core/browser/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698