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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider.h

Issue 2702223004: [Remote suggestions] Move all decisions to fetch to the scheduler (Closed)
Patch Set: Fixing an embarassing bug :) 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/remote/remote_suggestions_provider.h
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider.h b/components/ntp_snippets/remote/remote_suggestions_provider.h
index c9f58c45fb10639a62bdddc4a7131906f75552a7..ef361fa61f7e90301d47ea82c47d97e5b672e4b4 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider.h
+++ b/components/ntp_snippets/remote/remote_suggestions_provider.h
@@ -19,14 +19,6 @@ class RemoteSuggestionsFetcher;
// provides them as content suggestions.
class RemoteSuggestionsProvider : public ContentSuggestionsProvider {
public:
- // TODO(jkrcal): Would be nice to get rid of this another level of statuses.
- // Maybe possible while refactoring the RemoteSuggestionsStatusService? (and
- // letting it notify both the SchedulingRemoteSuggestionsProvider and
- // RemoteSuggestionsProviderImpl or just the scheduling one).
- enum class ProviderStatus { ACTIVE, INACTIVE };
- using ProviderStatusCallback =
- base::RepeatingCallback<void(ProviderStatus status)>;
-
// Callback to notify with the result of a fetch.
// TODO(jkrcal): Change to OnceCallback? A OnceCallback does only have a
// move-constructor which seems problematic for google mock.
@@ -34,14 +26,6 @@ class RemoteSuggestionsProvider : public ContentSuggestionsProvider {
~RemoteSuggestionsProvider() override;
- // Set a callback to be notified whenever the status of the provider changes.
- // The initial change is also notified (switching from an initial undecided
- // status). If the callback is set after the first change, it is called back
- // immediately.
- // TODO(treib): Get rid of unique_ptrs to callbacks.
- virtual void SetProviderStatusCallback(
- std::unique_ptr<ProviderStatusCallback> callback) = 0;
-
// Fetches suggestions from the server for all remote categories and replaces
// old suggestions by the new ones. The request to the server is performed as
// an background request. Background requests are used for actions not

Powered by Google App Engine
This is Rietveld 408576698