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

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

Issue 2338133006: [NTP] Fix article suggestion clicks contributing to Most Visited tiles (Closed)
Patch Set: Updated trivial occurrence in unit test. Created 4 years, 3 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/history_backend.cc
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
index d92049f71f0fd19e42b304c6586d0cde80fb4702..0b3f6cd2508b3f5075dd55dd4545b03ca655210e 100644
--- a/components/history/core/browser/history_backend.cc
+++ b/components/history/core/browser/history_backend.cc
@@ -522,7 +522,7 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) {
// Update the segment for this visit. KEYWORD_GENERATED visits should not
// result in changing most visited, so we don't update segments (most
// visited db).
- if (!is_keyword_generated) {
+ if (!is_keyword_generated && request.consider_for_ntp_most_visited) {
UpdateSegments(request.url, from_visit_id, last_ids.second, t,
request.time);
@@ -592,9 +592,10 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) {
last_ids = AddPageVisit(redirects[redirect_index], request.time,
last_ids.second, t, request.visit_source);
if (t & ui::PAGE_TRANSITION_CHAIN_START) {
- // Update the segment for this visit.
- UpdateSegments(redirects[redirect_index], from_visit_id,
- last_ids.second, t, request.time);
+ if (request.consider_for_ntp_most_visited) {
+ UpdateSegments(redirects[redirect_index], from_visit_id,
+ last_ids.second, t, request.time);
+ }
// Update the visit_details for this visit.
UpdateVisitDuration(from_visit_id, request.time);

Powered by Google App Engine
This is Rietveld 408576698