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

Side by Side Diff: components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc

Issue 2284393002: Add ClearHistory() to ContentSuggestionsService and its providers (Closed)
Patch Set: Marc's comments. 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
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/physical_web_pages/physical_web_page_suggestio ns_provider.h" 5 #include "components/ntp_snippets/physical_web_pages/physical_web_page_suggestio ns_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const std::string& suggestion_id) { 75 const std::string& suggestion_id) {
76 // TODO(vitaliii): Implement this and then 76 // TODO(vitaliii): Implement this and then
77 // ClearDismissedSuggestionsForDebugging. 77 // ClearDismissedSuggestionsForDebugging.
78 } 78 }
79 79
80 void PhysicalWebPageSuggestionsProvider::FetchSuggestionImage( 80 void PhysicalWebPageSuggestionsProvider::FetchSuggestionImage(
81 const std::string& suggestion_id, const ImageFetchedCallback& callback) { 81 const std::string& suggestion_id, const ImageFetchedCallback& callback) {
82 // TODO(vitaliii): Implement. 82 // TODO(vitaliii): Implement.
83 } 83 }
84 84
85 void PhysicalWebPageSuggestionsProvider::ClearHistory(base::Time begin,
86 base::Time end) {
87 // TODO(vitaliii): Implement.
Marc Treib 2016/08/30 09:50:18 Bug?
vitaliii 2016/08/30 11:04:22 Done.
88 }
89
85 void PhysicalWebPageSuggestionsProvider::ClearCachedSuggestions( 90 void PhysicalWebPageSuggestionsProvider::ClearCachedSuggestions(
86 Category category) { 91 Category category) {
87 // Ignored 92 // Ignored
88 } 93 }
89 94
90 void PhysicalWebPageSuggestionsProvider::GetDismissedSuggestionsForDebugging( 95 void PhysicalWebPageSuggestionsProvider::GetDismissedSuggestionsForDebugging(
91 Category category, 96 Category category,
92 const DismissedSuggestionsCallback& callback) { 97 const DismissedSuggestionsCallback& callback) {
93 // Not implemented. 98 // Not implemented.
94 callback.Run(std::vector<ContentSuggestion>()); 99 callback.Run(std::vector<ContentSuggestion>());
95 } 100 }
96 101
97 void PhysicalWebPageSuggestionsProvider::ClearDismissedSuggestionsForDebugging( 102 void PhysicalWebPageSuggestionsProvider::ClearDismissedSuggestionsForDebugging(
98 Category category) { 103 Category category) {
99 // TODO(vitaliii): Implement when dismissed suggestions are supported. 104 // TODO(vitaliii): Implement when dismissed suggestions are supported.
100 } 105 }
101 106
102 //////////////////////////////////////////////////////////////////////////////// 107 ////////////////////////////////////////////////////////////////////////////////
103 // Private methods 108 // Private methods
104 109
105 // Updates the |category_status_| and notifies the |observer_|, if necessary. 110 // Updates the |category_status_| and notifies the |observer_|, if necessary.
106 void PhysicalWebPageSuggestionsProvider::NotifyStatusChanged( 111 void PhysicalWebPageSuggestionsProvider::NotifyStatusChanged(
107 CategoryStatus new_status) { 112 CategoryStatus new_status) {
108 if (category_status_ == new_status) return; 113 if (category_status_ == new_status) return;
109 category_status_ = new_status; 114 category_status_ = new_status;
110 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); 115 observer()->OnCategoryStatusChanged(this, provided_category_, new_status);
111 } 116 }
112 117
113 } // namespace ntp_snippets 118 } // namespace ntp_snippets
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698