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

Side by Side Diff: components/ntp_snippets/reading_list/reading_list_suggestions_provider.h

Issue 2770893003: Add logic for fetching the Reading List entries (Closed)
Patch Set: Rebase Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H _ 5 #ifndef COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H _
6 #define COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H _ 6 #define COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDER_H _
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void ClearCachedSuggestions(Category category) override; 44 void ClearCachedSuggestions(Category category) override;
45 void GetDismissedSuggestionsForDebugging( 45 void GetDismissedSuggestionsForDebugging(
46 Category category, 46 Category category,
47 const DismissedSuggestionsCallback& callback) override; 47 const DismissedSuggestionsCallback& callback) override;
48 void ClearDismissedSuggestionsForDebugging(Category category) override; 48 void ClearDismissedSuggestionsForDebugging(Category category) override;
49 49
50 // ReadingListModelObserver implementation. 50 // ReadingListModelObserver implementation.
51 void ReadingListModelLoaded(const ReadingListModel* model) override; 51 void ReadingListModelLoaded(const ReadingListModel* model) override;
52 52
53 private: 53 private:
54 // The actual method to fetch Reading List entries. Must be called after the
55 // model is loaded.
54 void FetchReadingListInternal(); 56 void FetchReadingListInternal();
55 57
58 // Updates the |category_status_| and notifies the |observer_|, if necessary.
59 void NotifyStatusChanged(CategoryStatus new_status);
56 CategoryStatus category_status_; 60 CategoryStatus category_status_;
57 const Category provided_category_; 61 const Category provided_category_;
58 62
59 ReadingListModel* reading_list_model_; 63 ReadingListModel* reading_list_model_;
60 64
61 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider); 65 DISALLOW_COPY_AND_ASSIGN(ReadingListSuggestionsProvider);
62 }; 66 };
63 67
64 } // namespace ntp_snippets 68 } // namespace ntp_snippets
65 69
66 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_ 70 #endif // COMPONENTS_NTP_SNIPPETS_READING_LIST_READING_LIST_SUGGESTIONS_PROVIDE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698