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

Side by Side Diff: components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc

Issue 2279273002: Bookmark Suggestions: don't use creation date fallback by default (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h" 5 #include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 16 matching lines...) Expand all
27 #include "ui/gfx/image/image.h" 27 #include "ui/gfx/image/image.h"
28 28
29 using bookmarks::BookmarkModel; 29 using bookmarks::BookmarkModel;
30 using bookmarks::BookmarkNode; 30 using bookmarks::BookmarkNode;
31 31
32 namespace { 32 namespace {
33 33
34 const int kMaxBookmarks = 10; 34 const int kMaxBookmarks = 10;
35 const int kMinBookmarks = 3; 35 const int kMinBookmarks = 3;
36 const int kMaxBookmarkAgeInDays = 42; 36 const int kMaxBookmarkAgeInDays = 42;
37 const int kUseCreationDateFallbackForDays = 42; 37 const int kUseCreationDateFallbackForDays = 0;
38 38
39 const char* kMaxBookmarksParamName = "bookmarks_max_count"; 39 const char* kMaxBookmarksParamName = "bookmarks_max_count";
40 const char* kMinBookmarksParamName = "bookmarks_min_count"; 40 const char* kMinBookmarksParamName = "bookmarks_min_count";
41 const char* kMaxBookmarkAgeInDaysParamName = "bookmarks_max_age_in_days"; 41 const char* kMaxBookmarkAgeInDaysParamName = "bookmarks_max_age_in_days";
42 const char* kUseCreationDateFallbackForDaysParamName = 42 const char* kUseCreationDateFallbackForDaysParamName =
43 "bookmarks_creation_date_fallback_days"; 43 "bookmarks_creation_date_fallback_days";
44 const char* kShowIfEmptyParamName = "bookmarks_show_if_empty"; 44 const char* kShowIfEmptyParamName = "bookmarks_show_if_empty";
45 45
46 base::Time GetThresholdTime() { 46 base::Time GetThresholdTime() {
47 std::string age_in_days_string = variations::GetVariationParamValueByFeature( 47 std::string age_in_days_string = variations::GetVariationParamValueByFeature(
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 void BookmarkSuggestionsProvider::NotifyStatusChanged( 304 void BookmarkSuggestionsProvider::NotifyStatusChanged(
305 CategoryStatus new_status) { 305 CategoryStatus new_status) {
306 if (category_status_ == new_status) 306 if (category_status_ == new_status)
307 return; 307 return;
308 category_status_ = new_status; 308 category_status_ = new_status;
309 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); 309 observer()->OnCategoryStatusChanged(this, provided_category_, new_status);
310 } 310 }
311 311
312 } // namespace ntp_snippets 312 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698