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

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

Issue 2744253004: NTP: clang-format (Closed)
Patch Set: rebase Created 3 years, 8 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void ClearCachedSuggestions(Category category) override; 105 void ClearCachedSuggestions(Category category) override;
106 void OnSignInStateChanged() override; 106 void OnSignInStateChanged() override;
107 void GetDismissedSuggestionsForDebugging( 107 void GetDismissedSuggestionsForDebugging(
108 Category category, 108 Category category,
109 const DismissedSuggestionsCallback& callback) override; 109 const DismissedSuggestionsCallback& callback) override;
110 void ClearDismissedSuggestionsForDebugging(Category category) override; 110 void ClearDismissedSuggestionsForDebugging(Category category) override;
111 111
112 private: 112 private:
113 // Abstract description of the fetching schedule. 113 // Abstract description of the fetching schedule.
114 struct FetchingSchedule { 114 struct FetchingSchedule {
115 static FetchingSchedule Empty(); 115 static FetchingSchedule Empty();
116 bool operator==(const FetchingSchedule& other) const; 116 bool operator==(const FetchingSchedule& other) const;
117 bool operator!=(const FetchingSchedule& other) const; 117 bool operator!=(const FetchingSchedule& other) const;
118 bool is_empty() const; 118 bool is_empty() const;
119 119
120 base::TimeDelta interval_persistent_wifi; 120 base::TimeDelta interval_persistent_wifi;
121 base::TimeDelta interval_persistent_fallback; 121 base::TimeDelta interval_persistent_fallback;
122 base::TimeDelta interval_soft_on_usage_event; 122 base::TimeDelta interval_soft_on_usage_event;
123 base::TimeDelta interval_soft_on_ntp_opened; 123 base::TimeDelta interval_soft_on_ntp_opened;
124 }; 124 };
125 125
126 enum class TriggerType; 126 enum class TriggerType;
127 127
128 // After the call, updates will be scheduled in the future. Idempotent, can be 128 // After the call, updates will be scheduled in the future. Idempotent, can be
129 // run any time later without impacting the current schedule. 129 // run any time later without impacting the current schedule.
130 // If you want to enforce rescheduling, call Unschedule() and then Schedule(). 130 // If you want to enforce rescheduling, call Unschedule() and then Schedule().
131 void StartScheduling(); 131 void StartScheduling();
132 132
133 // After the call, no updates will happen before another call to Schedule(). 133 // After the call, no updates will happen before another call to Schedule().
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 std::set<SchedulingRemoteSuggestionsProvider::TriggerType> enabled_triggers_; 203 std::set<SchedulingRemoteSuggestionsProvider::TriggerType> enabled_triggers_;
204 204
205 base::Time background_fetches_allowed_after_; 205 base::Time background_fetches_allowed_after_;
206 206
207 DISALLOW_COPY_AND_ASSIGN(SchedulingRemoteSuggestionsProvider); 207 DISALLOW_COPY_AND_ASSIGN(SchedulingRemoteSuggestionsProvider);
208 }; 208 };
209 209
210 } // namespace ntp_snippets 210 } // namespace ntp_snippets
211 211
212 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER _H_ 212 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_SCHEDULING_REMOTE_SUGGESTIONS_PROVIDER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698