Currently the click counts can overflow and there is no mechanism to avoid this. Instead we could decay them, once the decay is implemented.
CL https://codereview.chromium.org/2599293002/
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1e8492aea8959ffaf818bb05f28368e524505ab7 commit 1e8492aea8959ffaf818bb05f28368e524505ab7 Author: vitaliii <vitaliii@chromium.org> Date: Wed Jan 04 10:53:13 2017 [NTP::SectionOrder] Implement click counts decay. The click based ranker must "forget" history with time, so that changes in the user behavior are reflected by the order in reasonable time. This is done in thic CL using multiplicative click count decay with time. Count overflow is ignored (it is unlikely to happen due to the decay) and a comment is added. BUG= 675918 , 676279 Review-Url: https://codereview.chromium.org/2599293002 Cr-Commit-Position: refs/heads/master@{#441353} [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/category_rankers/click_based_category_ranker.cc [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/category_rankers/click_based_category_ranker.h [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/category_rankers/click_based_category_ranker_unittest.cc [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/features.cc [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/features.h [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/pref_names.cc [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/components/ntp_snippets/pref_names.h [modify] https://crrev.com/1e8492aea8959ffaf818bb05f28368e524505ab7/ios/chrome/browser/ntp_snippets/ios_chrome_content_suggestions_service_factory.cc
In the end we decided not to prevent overflows, since they are very unlikely due to decays.
Comment 1 by vitaliii@chromium.org
, Dec 22 2016