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

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

Issue 2663313002: 📰 Merge the has_fetch_more and has_reload actions (Closed)
Patch Set: rebase Created 3 years, 10 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 CategoryStatus BookmarkSuggestionsProvider::GetCategoryStatus( 103 CategoryStatus BookmarkSuggestionsProvider::GetCategoryStatus(
104 Category category) { 104 Category category) {
105 DCHECK_EQ(category, provided_category_); 105 DCHECK_EQ(category, provided_category_);
106 return category_status_; 106 return category_status_;
107 } 107 }
108 108
109 CategoryInfo BookmarkSuggestionsProvider::GetCategoryInfo(Category category) { 109 CategoryInfo BookmarkSuggestionsProvider::GetCategoryInfo(Category category) {
110 return CategoryInfo( 110 return CategoryInfo(
111 l10n_util::GetStringUTF16(IDS_NTP_BOOKMARK_SUGGESTIONS_SECTION_HEADER), 111 l10n_util::GetStringUTF16(IDS_NTP_BOOKMARK_SUGGESTIONS_SECTION_HEADER),
112 ContentSuggestionsCardLayout::MINIMAL_CARD, 112 ContentSuggestionsCardLayout::MINIMAL_CARD,
113 /*has_more_action=*/false, 113 /*has_fetch_action=*/false,
114 /*has_reload_action=*/false,
115 /*has_view_all_action=*/true, 114 /*has_view_all_action=*/true,
116 /*show_if_empty=*/false, 115 /*show_if_empty=*/false,
117 l10n_util::GetStringUTF16(IDS_NTP_BOOKMARK_SUGGESTIONS_SECTION_EMPTY)); 116 l10n_util::GetStringUTF16(IDS_NTP_BOOKMARK_SUGGESTIONS_SECTION_EMPTY));
118 } 117 }
119 118
120 void BookmarkSuggestionsProvider::DismissSuggestion( 119 void BookmarkSuggestionsProvider::DismissSuggestion(
121 const ContentSuggestion::ID& suggestion_id) { 120 const ContentSuggestion::ID& suggestion_id) {
122 DCHECK(bookmark_model_->loaded()); 121 DCHECK(bookmark_model_->loaded());
123 GURL url(suggestion_id.id_within_category()); 122 GURL url(suggestion_id.id_within_category());
124 MarkBookmarksDismissed(bookmark_model_, url); 123 MarkBookmarksDismissed(bookmark_model_, url);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void BookmarkSuggestionsProvider::NotifyStatusChanged( 319 void BookmarkSuggestionsProvider::NotifyStatusChanged(
321 CategoryStatus new_status) { 320 CategoryStatus new_status) {
322 if (category_status_ == new_status) { 321 if (category_status_ == new_status) {
323 return; 322 return;
324 } 323 }
325 category_status_ = new_status; 324 category_status_ = new_status;
326 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); 325 observer()->OnCategoryStatusChanged(this, provided_category_, new_status);
327 } 326 }
328 327
329 } // namespace ntp_snippets 328 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « chrome/browser/ntp_snippets/download_suggestions_provider.cc ('k') | components/ntp_snippets/category_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698