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

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

Issue 2303713002: Implement ClearHistory for all ntp_snippets providers (Closed)
Patch Set: Marc's nits. 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_NTP_SNIPPETS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 std::set<std::string> GetSuggestionsHosts() const; 154 std::set<std::string> GetSuggestionsHosts() const;
155 155
156 // Returns the maximum number of snippets that will be shown at once. 156 // Returns the maximum number of snippets that will be shown at once.
157 static int GetMaxSnippetCountForTesting(); 157 static int GetMaxSnippetCountForTesting();
158 158
159 // Available snippets, only for unit tests. 159 // Available snippets, only for unit tests.
160 const NTPSnippet::PtrVector& GetSnippetsForTesting() const { 160 const NTPSnippet::PtrVector& GetSnippetsForTesting() const {
161 return snippets_; 161 return snippets_;
162 } 162 }
163 163
164 // Dismissed snippets, only for unit tests.
165 const NTPSnippet::PtrVector& GetDismissedSnippetsForTesting() const {
166 return dismissed_snippets_;
167 }
168
164 private: 169 private:
165 friend class NTPSnippetsServiceTest; 170 friend class NTPSnippetsServiceTest;
166 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsServiceTest, StatusChanges); 171 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsServiceTest, StatusChanges);
167 172
168 // Possible state transitions: 173 // Possible state transitions:
169 // NOT_INITED --------+ 174 // NOT_INITED --------+
170 // / \ | 175 // / \ |
171 // v v | 176 // v v |
172 // READY <--> DISABLED | 177 // READY <--> DISABLED |
173 // \ / | 178 // \ / |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 351
347 // Request throttler for limiting requests to thumbnail images. 352 // Request throttler for limiting requests to thumbnail images.
348 RequestThrottler thumbnail_requests_throttler_; 353 RequestThrottler thumbnail_requests_throttler_;
349 354
350 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); 355 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
351 }; 356 };
352 357
353 } // namespace ntp_snippets 358 } // namespace ntp_snippets
354 359
355 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 360 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698