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

Side by Side Diff: components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.h

Issue 2421463002: FetchMore functionality backend (Closed)
Patch Set: Strategy pattern to handle differences in fetching procedure. Created 4 years, 2 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_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS _PROVIDER_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS _PROVIDER_H_
6 #define COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS _PROVIDER_H_ 6 #define COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTIONS _PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 30 matching lines...) Expand all
41 ~PhysicalWebPageSuggestionsProvider() override; 41 ~PhysicalWebPageSuggestionsProvider() override;
42 42
43 void OnDisplayableUrlsChanged(const std::vector<UrlInfo>& urls); 43 void OnDisplayableUrlsChanged(const std::vector<UrlInfo>& urls);
44 44
45 // ContentSuggestionsProvider implementation. 45 // ContentSuggestionsProvider implementation.
46 CategoryStatus GetCategoryStatus(Category category) override; 46 CategoryStatus GetCategoryStatus(Category category) override;
47 CategoryInfo GetCategoryInfo(Category category) override; 47 CategoryInfo GetCategoryInfo(Category category) override;
48 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override; 48 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override;
49 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, 49 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id,
50 const ImageFetchedCallback& callback) override; 50 const ImageFetchedCallback& callback) override;
51 void FetchMore() override;
51 void ClearHistory( 52 void ClearHistory(
52 base::Time begin, 53 base::Time begin,
53 base::Time end, 54 base::Time end,
54 const base::Callback<bool(const GURL& url)>& filter) override; 55 const base::Callback<bool(const GURL& url)>& filter) override;
55 void ClearCachedSuggestions(Category category) override; 56 void ClearCachedSuggestions(Category category) override;
56 void GetDismissedSuggestionsForDebugging( 57 void GetDismissedSuggestionsForDebugging(
57 Category category, 58 Category category,
58 const DismissedSuggestionsCallback& callback) override; 59 const DismissedSuggestionsCallback& callback) override;
59 void ClearDismissedSuggestionsForDebugging(Category category) override; 60 void ClearDismissedSuggestionsForDebugging(Category category) override;
60 61
61 private: 62 private:
62 void NotifyStatusChanged(CategoryStatus new_status); 63 void NotifyStatusChanged(CategoryStatus new_status);
63 64
64 CategoryStatus category_status_; 65 CategoryStatus category_status_;
65 const Category provided_category_; 66 const Category provided_category_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(PhysicalWebPageSuggestionsProvider); 68 DISALLOW_COPY_AND_ASSIGN(PhysicalWebPageSuggestionsProvider);
68 }; 69 };
69 70
70 } // namespace ntp_snippets 71 } // namespace ntp_snippets
71 72
72 #endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTI ONS_PROVIDER_H_ 73 #endif // COMPONENTS_NTP_SNIPPETS_PHYSICAL_WEB_PAGES_PHYSICAL_WEB_PAGE_SUGGESTI ONS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698