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

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

Issue 2485933003: Fixes an invalidated pointer access in NTPSnipppetsFetcher. (Closed)
Patch Set: adressed other comments from https://codereview.chromium.org/2473483006/ Created 4 years, 1 month 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_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_
6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ 6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ~RecentTabSuggestionsProvider() override; 42 ~RecentTabSuggestionsProvider() override;
43 43
44 // ContentSuggestionsProvider implementation. 44 // ContentSuggestionsProvider implementation.
45 CategoryStatus GetCategoryStatus(Category category) override; 45 CategoryStatus GetCategoryStatus(Category category) override;
46 CategoryInfo GetCategoryInfo(Category category) override; 46 CategoryInfo GetCategoryInfo(Category category) override;
47 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override; 47 void DismissSuggestion(const ContentSuggestion::ID& suggestion_id) override;
48 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id, 48 void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id,
49 const ImageFetchedCallback& callback) override; 49 const ImageFetchedCallback& callback) override;
50 void Fetch(const Category& category, 50 void Fetch(const Category& category,
51 const std::set<std::string>& known_suggestion_ids, 51 const std::set<std::string>& known_suggestion_ids,
52 FetchingCallback callback) override; 52 const FetchingCallback& callback) override;
53 void ClearHistory( 53 void ClearHistory(
54 base::Time begin, 54 base::Time begin,
55 base::Time end, 55 base::Time end,
56 const base::Callback<bool(const GURL& url)>& filter) override; 56 const base::Callback<bool(const GURL& url)>& filter) override;
57 void ClearCachedSuggestions(Category category) override; 57 void ClearCachedSuggestions(Category category) override;
58 void GetDismissedSuggestionsForDebugging( 58 void GetDismissedSuggestionsForDebugging(
59 Category category, 59 Category category,
60 const DismissedSuggestionsCallback& callback) override; 60 const DismissedSuggestionsCallback& callback) override;
61 void ClearDismissedSuggestionsForDebugging(Category category) override; 61 void ClearDismissedSuggestionsForDebugging(Category category) override;
62 62
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 PrefService* pref_service_; 113 PrefService* pref_service_;
114 114
115 base::WeakPtrFactory<RecentTabSuggestionsProvider> weak_ptr_factory_; 115 base::WeakPtrFactory<RecentTabSuggestionsProvider> weak_ptr_factory_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(RecentTabSuggestionsProvider); 117 DISALLOW_COPY_AND_ASSIGN(RecentTabSuggestionsProvider);
118 }; 118 };
119 119
120 } // namespace ntp_snippets 120 } // namespace ntp_snippets
121 121
122 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER _H_ 122 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698