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

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

Issue 2260783002: Make GetDismissedSuggestionsForDebugging asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace function pointer, use multiple if-continue Created 4 years, 4 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void RescheduleFetching(); 131 void RescheduleFetching();
132 132
133 // ContentSuggestionsProvider implementation 133 // ContentSuggestionsProvider implementation
134 std::vector<Category> GetProvidedCategories() override; 134 std::vector<Category> GetProvidedCategories() override;
135 CategoryStatus GetCategoryStatus(Category category) override; 135 CategoryStatus GetCategoryStatus(Category category) override;
136 CategoryInfo GetCategoryInfo(Category category) override; 136 CategoryInfo GetCategoryInfo(Category category) override;
137 void DismissSuggestion(const std::string& suggestion_id) override; 137 void DismissSuggestion(const std::string& suggestion_id) override;
138 void FetchSuggestionImage(const std::string& suggestion_id, 138 void FetchSuggestionImage(const std::string& suggestion_id,
139 const ImageFetchedCallback& callback) override; 139 const ImageFetchedCallback& callback) override;
140 void ClearCachedSuggestionsForDebugging(Category category) override; 140 void ClearCachedSuggestionsForDebugging(Category category) override;
141 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( 141 void GetDismissedSuggestionsForDebugging(
142 Category category) override; 142 Category category,
143 const DismissedSuggestionsCallback& callback) override;
143 void ClearDismissedSuggestionsForDebugging(Category category) override; 144 void ClearDismissedSuggestionsForDebugging(Category category) override;
144 145
145 // Returns the lists of suggestion hosts the snippets are restricted to. 146 // Returns the lists of suggestion hosts the snippets are restricted to.
146 std::set<std::string> GetSuggestionsHosts() const; 147 std::set<std::string> GetSuggestionsHosts() const;
147 148
148 // Returns the maximum number of snippets that will be shown at once. 149 // Returns the maximum number of snippets that will be shown at once.
149 static int GetMaxSnippetCountForTesting(); 150 static int GetMaxSnippetCountForTesting();
150 151
151 // Available snippets, only for unit tests. 152 // Available snippets, only for unit tests.
152 const NTPSnippet::PtrVector& GetSnippetsForTesting() const { 153 const NTPSnippet::PtrVector& GetSnippetsForTesting() const {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 318
318 // Request throttler for limiting requests to thumbnail images. 319 // Request throttler for limiting requests to thumbnail images.
319 RequestThrottler thumbnail_requests_throttler_; 320 RequestThrottler thumbnail_requests_throttler_;
320 321
321 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); 322 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
322 }; 323 };
323 324
324 } // namespace ntp_snippets 325 } // namespace ntp_snippets
325 326
326 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 327 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestions_service_unittest.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698