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

Side by Side Diff: components/ntp_snippets/content_suggestions_provider.h

Issue 2292003002: Move OnURLsDeleted from NTPSnippetsService to ContentSuggestionsService (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
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 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual void DismissSuggestion(const std::string& suggestion_id) = 0; 94 virtual void DismissSuggestion(const std::string& suggestion_id) = 0;
95 95
96 // Fetches the image for the suggestion with the given ID and returns it 96 // Fetches the image for the suggestion with the given ID and returns it
97 // through the callback. This fetch may occur locally or from the internet. 97 // through the callback. This fetch may occur locally or from the internet.
98 // If that suggestion doesn't exist, doesn't have an image or if the fetch 98 // If that suggestion doesn't exist, doesn't have an image or if the fetch
99 // fails, the callback gets a null image. The callback will not be called 99 // fails, the callback gets a null image. The callback will not be called
100 // synchronously. 100 // synchronously.
101 virtual void FetchSuggestionImage(const std::string& suggestion_id, 101 virtual void FetchSuggestionImage(const std::string& suggestion_id,
102 const ImageFetchedCallback& callback) = 0; 102 const ImageFetchedCallback& callback) = 0;
103 103
104 // Removes the given list of URLs and their associated data (depends on the
105 // provider) from all providers. Providers should immediately clear any
vitaliii 2016/09/02 12:38:30 I am not sure about the wording. Should it be "fro
Marc Treib 2016/09/02 12:57:10 See below - if possible, I'd like to merge this wi
vitaliii 2016/09/02 14:13:16 Done.
106 // history-related data associated with |deleted_urls| or all data if
107 // |all_history| is true.
108 virtual void RemoveURLsFromHistory(bool all_history,
Marc Treib 2016/09/02 12:57:10 Hm, with all_history==true, isn't this essentially
vitaliii 2016/09/02 14:13:16 Done.
109 const std::vector<GURL>& deleted_urls) = 0;
110
104 // Removes history from the specified time range where the URL matches the 111 // Removes history from the specified time range where the URL matches the
105 // |filter|. The data removed depends on the provider. Note that the 112 // |filter|. The data removed depends on the provider. Note that the
106 // data outside the time range may be deleted, for example suggestions, which 113 // data outside the time range may be deleted, for example suggestions, which
107 // are based on history from that time range. Providers should immediately 114 // are based on history from that time range. Providers should immediately
108 // clear any data related to history from the specified time range where the 115 // clear any data related to history from the specified time range where the
109 // URL matches the |filter|. 116 // URL matches the |filter|.
110 virtual void ClearHistory( 117 virtual void ClearHistory(
111 base::Time begin, 118 base::Time begin,
112 base::Time end, 119 base::Time end,
113 const base::Callback<bool(const GURL& url)>& filter) = 0; 120 const base::Callback<bool(const GURL& url)>& filter) = 0;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 CategoryFactory* category_factory() const { return category_factory_; } 160 CategoryFactory* category_factory() const { return category_factory_; }
154 161
155 private: 162 private:
156 Observer* observer_; 163 Observer* observer_;
157 CategoryFactory* category_factory_; 164 CategoryFactory* category_factory_;
158 }; 165 };
159 166
160 } // namespace ntp_snippets 167 } // namespace ntp_snippets
161 168
162 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_ 169 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698