Chromium Code Reviews| 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..9a0ca093f276666c7c1d3176cba5219a4cb0c0c4 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); |
| @@ -593,8 +593,10 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { |
| last_ids.second, t, request.visit_source); |
| if (t & ui::PAGE_TRANSITION_CHAIN_START) { |
| // Update the segment for this visit. |
|
sky
2016/09/16 17:18:51
This comment belongs inside the if, but the commen
mastiz
2016/09/16 17:58:20
Done.
|
| - 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); |