OLD | NEW |
---|---|
(Empty) | |
1 | |
sfiera
2017/06/07 13:58:15
Nit:
mamir
2017/06/08 09:58:28
Done.
| |
2 // Copyright 2017 The Chromium Authors. All rights reserved. | |
3 // Use of this source code is governed by a BSD-style license that can be | |
4 // found in the LICENSE file. | |
5 | |
6 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_BREAKING_NEWS_SUGGESTIONS_PROVIDER_H_ | |
sfiera
2017/06/07 13:58:15
Should have another BREAKING_NEWS_, I think?
mamir
2017/06/08 09:58:28
Done.
| |
7 #define COMPONENTS_NTP_SNIPPETS_REMOTE_BREAKING_NEWS_SUGGESTIONS_PROVIDER_H_ | |
8 | |
9 #include "components/ntp_snippets/category.h" | |
10 #include "components/ntp_snippets/content_suggestions_provider.h" | |
11 #include "components/prefs/pref_registry_simple.h" | |
12 | |
13 class PrefRegistrySimple; | |
14 namespace ntp_snippets { | |
15 class ContentSuggestionsGCMAppHandler; | |
16 } | |
17 | |
18 namespace ntp_snippets { | |
19 | |
20 // Receives breaking news suggestions via GCM push messages, stores them and | |
21 // provides them as content suggestions. | |
22 class BreakingNewsSuggestionsProvider : public ContentSuggestionsProvider { | |
23 public: | |
24 BreakingNewsSuggestionsProvider( | |
25 ContentSuggestionsProvider::Observer* observer, | |
26 std::unique_ptr<ContentSuggestionsGCMAppHandler> gcm_app_handler); | |
27 virtual ~BreakingNewsSuggestionsProvider(); | |
28 | |
29 static void RegisterProfilePrefs(PrefRegistrySimple* registry); | |
sfiera
2017/06/07 13:58:14
Not implemented
mamir
2017/06/08 09:58:28
Done.
| |
30 | |
31 private: | |
32 std::unique_ptr<ContentSuggestionsGCMAppHandler> gcm_app_handler_; | |
sfiera
2017/06/07 13:58:14
Methods before member variables
mamir
2017/06/08 09:58:28
Done.
| |
33 const Category provided_category_; | |
34 | |
35 // ContentSuggestionsProvider implementation. | |
36 CategoryStatus GetCategoryStatus(Category category) override; | |
37 CategoryInfo GetCategoryInfo(Category category) override; | |
38 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override; | |
39 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, | |
40 const ImageFetchedCallback& callback) override; | |
41 void Fetch(const Category& category, | |
42 const std::set<std::string>& known_suggestion_ids, | |
43 const FetchDoneCallback& callback) override; | |
44 void ClearHistory( | |
45 base::Time begin, | |
46 base::Time end, | |
47 const base::Callback<bool(const GURL& url)>& filter) override; | |
48 void ClearCachedSuggestions(Category category) override; | |
49 void GetDismissedSuggestionsForDebugging( | |
50 Category category, | |
51 const DismissedSuggestionsCallback& callback) override; | |
52 void ClearDismissedSuggestionsForDebugging(Category category) override; | |
53 | |
54 CategoryStatus category_status_; | |
55 }; | |
56 | |
57 } // namespace ntp_snippets | |
58 | |
59 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_BREAKING_NEWS_SUGGESTIONS_PROVIDER_H_ | |
OLD | NEW |