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

Side by Side Diff: components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h

Issue 2599743002: Trigger the Snippets Scheduler when Resuming Activities (Closed)
Patch Set: Two separate signals instead of boolean value. Created 3 years, 11 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_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER_H_
6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER_H_ 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const UserClassifier* user_classifier, 57 const UserClassifier* user_classifier,
58 PrefService* pref_service); 58 PrefService* pref_service);
59 59
60 ~SchedulingRemoteSuggestionsProvider() override; 60 ~SchedulingRemoteSuggestionsProvider() override;
61 61
62 static void RegisterProfilePrefs(PrefRegistrySimple* registry); 62 static void RegisterProfilePrefs(PrefRegistrySimple* registry);
63 63
64 // RemoteSuggestionsScheduler implementation. 64 // RemoteSuggestionsScheduler implementation.
65 void RescheduleFetching() override; 65 void RescheduleFetching() override;
66 void OnPersistentSchedulerWakeUp() override; 66 void OnPersistentSchedulerWakeUp() override;
67 void OnBrowserStartup() override; 67 void OnBrowserForegrounded() override;
68 void OnBrowserColdStart() override;
68 void OnNTPOpened() override; 69 void OnNTPOpened() override;
69 70
70 // RemoteSuggestionsProvider implementation. 71 // RemoteSuggestionsProvider implementation.
71 void SetProviderStatusCallback( 72 void SetProviderStatusCallback(
72 std::unique_ptr<ProviderStatusCallback> callback) override; 73 std::unique_ptr<ProviderStatusCallback> callback) override;
73 void RefetchInTheBackground( 74 void RefetchInTheBackground(
74 std::unique_ptr<FetchStatusCallback> callback) override; 75 std::unique_ptr<FetchStatusCallback> callback) override;
75 const NTPSnippetsFetcher* snippets_fetcher_for_testing_and_debugging() 76 const NTPSnippetsFetcher* snippets_fetcher_for_testing_and_debugging()
76 const override; 77 const override;
77 78
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 const UserClassifier* user_classifier_; 141 const UserClassifier* user_classifier_;
141 142
142 PrefService* pref_service_; 143 PrefService* pref_service_;
143 144
144 DISALLOW_COPY_AND_ASSIGN(SchedulingRemoteSuggestionsProvider); 145 DISALLOW_COPY_AND_ASSIGN(SchedulingRemoteSuggestionsProvider);
145 }; 146 };
146 147
147 } // namespace ntp_snippets 148 } // namespace ntp_snippets
148 149
149 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER _H_ 150 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698