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

Unified Diff: components/history/core/browser/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
« no previous file with comments | « components/history/core/browser/history_backend.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/history_backend.cc
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
index a1fdba9652e622ae13848bb9c8f637029e95f0ab..7285dae868772e5ab688322bde969db4edd87fb6 100644
--- a/components/history/core/browser/history_backend.cc
+++ b/components/history/core/browser/history_backend.cc
@@ -725,14 +725,13 @@ std::pair<URLID, VisitID> HistoryBackend::AddPageVisit(
// NOTE: This code must stay in sync with
// ExpireHistoryBackend::ExpireURLsForVisits().
- // TODO(pkasting): http://b/1148304 We shouldn't be marking so many URLs as
- // typed, which would eliminate the need for this code.
int typed_increment = 0;
ui::PageTransition transition_type =
ui::PageTransitionStripQualifier(transition);
- if ((transition_type == ui::PAGE_TRANSITION_TYPED &&
- !ui::PageTransitionIsRedirect(transition)) ||
- transition_type == ui::PAGE_TRANSITION_KEYWORD_GENERATED)
+ if (ui::PageTransitionIsNewNavigation(transition) &&
+ ((transition_type == ui::PAGE_TRANSITION_TYPED &&
+ !ui::PageTransitionIsRedirect(transition)) ||
+ transition_type == ui::PAGE_TRANSITION_KEYWORD_GENERATED))
typed_increment = 1;
// See if this URL is already in the DB.
« no previous file with comments | « components/history/core/browser/history_backend.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698