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

Side by Side Diff: components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h

Issue 2225753003: Revert of Add per-section clearing and dismissed suggestions to snippets-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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_OFFLINE_PAGES_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_ H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_ H_
6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_ H_ 6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGE_SUGGESTIONS_PROVIDER_ H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 offline_pages::OfflinePageModel* offline_page_model); 36 offline_pages::OfflinePageModel* offline_page_model);
37 ~OfflinePageSuggestionsProvider() override; 37 ~OfflinePageSuggestionsProvider() override;
38 38
39 private: 39 private:
40 // ContentSuggestionsProvider implementation. 40 // ContentSuggestionsProvider implementation.
41 std::vector<Category> GetProvidedCategories() override; 41 std::vector<Category> GetProvidedCategories() override;
42 CategoryStatus GetCategoryStatus(Category category) override; 42 CategoryStatus GetCategoryStatus(Category category) override;
43 void DismissSuggestion(const std::string& suggestion_id) override; 43 void DismissSuggestion(const std::string& suggestion_id) override;
44 void FetchSuggestionImage(const std::string& suggestion_id, 44 void FetchSuggestionImage(const std::string& suggestion_id,
45 const ImageFetchedCallback& callback) override; 45 const ImageFetchedCallback& callback) override;
46 void ClearCachedSuggestionsForDebugging(Category category) override; 46 void ClearCachedSuggestionsForDebugging() override;
47 std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging( 47 void ClearDismissedSuggestionsForDebugging() override;
48 Category category) override;
49 void ClearDismissedSuggestionsForDebugging(Category category) override;
50 48
51 // OfflinePageModel::Observer implementation. 49 // OfflinePageModel::Observer implementation.
52 void OfflinePageModelLoaded(offline_pages::OfflinePageModel* model) override; 50 void OfflinePageModelLoaded(offline_pages::OfflinePageModel* model) override;
53 void OfflinePageModelChanged(offline_pages::OfflinePageModel* model) override; 51 void OfflinePageModelChanged(offline_pages::OfflinePageModel* model) override;
54 void OfflinePageDeleted(int64_t offline_id, 52 void OfflinePageDeleted(int64_t offline_id,
55 const offline_pages::ClientId& client_id) override; 53 const offline_pages::ClientId& client_id) override;
56 54
57 // Queries the OfflinePageModel for offline pages. 55 // Queries the OfflinePageModel for offline pages.
58 void FetchOfflinePages(); 56 void FetchOfflinePages();
59 57
60 // Callback from the OfflinePageModel. 58 // Callback from the OfflinePageModel.
61 void OnOfflinePagesLoaded( 59 void OnOfflinePagesLoaded(
62 const offline_pages::MultipleOfflinePageItemResult& result); 60 const offline_pages::MultipleOfflinePageItemResult& result);
63 61
64 // Updates the |category_status_| and notifies the |observer_|, if necessary. 62 // Updates the |category_status_| and notifies the |observer_|, if necessary.
65 void NotifyStatusChanged(CategoryStatus new_status); 63 void NotifyStatusChanged(CategoryStatus new_status);
66 64
67 CategoryStatus category_status_; 65 CategoryStatus category_status_;
68 66
69 offline_pages::OfflinePageModel* offline_page_model_; 67 offline_pages::OfflinePageModel* offline_page_model_;
70 68
71 const Category provided_category_; 69 const Category provided_category_;
72 70
73 DISALLOW_COPY_AND_ASSIGN(OfflinePageSuggestionsProvider); 71 DISALLOW_COPY_AND_ASSIGN(OfflinePageSuggestionsProvider);
74 }; 72 };
75 73
76 } // namespace ntp_snippets 74 } // namespace ntp_snippets
77 75
78 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGE_SUGGESTIONS_PROVID ER_H_ 76 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_OFFLINE_PAGE_SUGGESTIONS_PROVID ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698