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

Side by Side Diff: chrome/browser/ntp_snippets/download_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
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_BROWSER_NTP_SNIPPETS_DOWNLOAD_SUGGESTIONS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_DOWNLOAD_SUGGESTIONS_PROVIDER_H_
6 #define CHROME_BROWSER_NTP_SNIPPETS_DOWNLOAD_SUGGESTIONS_PROVIDER_H_ 6 #define CHROME_BROWSER_NTP_SNIPPETS_DOWNLOAD_SUGGESTIONS_PROVIDER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ntp_snippets::Category category) override; 56 ntp_snippets::Category category) override;
57 ntp_snippets::CategoryInfo GetCategoryInfo( 57 ntp_snippets::CategoryInfo GetCategoryInfo(
58 ntp_snippets::Category category) override; 58 ntp_snippets::Category category) override;
59 void DismissSuggestion( 59 void DismissSuggestion(
60 const ntp_snippets::ContentSuggestion::ID& suggestion_id) override; 60 const ntp_snippets::ContentSuggestion::ID& suggestion_id) override;
61 void FetchSuggestionImage( 61 void FetchSuggestionImage(
62 const ntp_snippets::ContentSuggestion::ID& suggestion_id, 62 const ntp_snippets::ContentSuggestion::ID& suggestion_id,
63 const ImageFetchedCallback& callback) override; 63 const ImageFetchedCallback& callback) override;
64 void Fetch(const ntp_snippets::Category& category, 64 void Fetch(const ntp_snippets::Category& category,
65 const std::set<std::string>& known_suggestion_ids, 65 const std::set<std::string>& known_suggestion_ids,
66 FetchingCallback callback) override; 66 const FetchingCallback& callback) override;
67 void ClearHistory( 67 void ClearHistory(
68 base::Time begin, 68 base::Time begin,
69 base::Time end, 69 base::Time end,
70 const base::Callback<bool(const GURL& url)>& filter) override; 70 const base::Callback<bool(const GURL& url)>& filter) override;
71 void ClearCachedSuggestions(ntp_snippets::Category category) override; 71 void ClearCachedSuggestions(ntp_snippets::Category category) override;
72 void GetDismissedSuggestionsForDebugging( 72 void GetDismissedSuggestionsForDebugging(
73 ntp_snippets::Category category, 73 ntp_snippets::Category category,
74 const DismissedSuggestionsCallback& callback) override; 74 const DismissedSuggestionsCallback& callback) override;
75 void ClearDismissedSuggestionsForDebugging( 75 void ClearDismissedSuggestionsForDebugging(
76 ntp_snippets::Category category) override; 76 ntp_snippets::Category category) override;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Whether the Download Manager UI is enabled, in which case the More button 219 // Whether the Download Manager UI is enabled, in which case the More button
220 // for the Downloads section can redirect there. 220 // for the Downloads section can redirect there.
221 const bool download_manager_ui_enabled_; 221 const bool download_manager_ui_enabled_;
222 222
223 base::WeakPtrFactory<DownloadSuggestionsProvider> weak_ptr_factory_; 223 base::WeakPtrFactory<DownloadSuggestionsProvider> weak_ptr_factory_;
224 224
225 DISALLOW_COPY_AND_ASSIGN(DownloadSuggestionsProvider); 225 DISALLOW_COPY_AND_ASSIGN(DownloadSuggestionsProvider);
226 }; 226 };
227 227
228 #endif // CHROME_BROWSER_NTP_SNIPPETS_DOWNLOAD_SUGGESTIONS_PROVIDER_H_ 228 #endif // CHROME_BROWSER_NTP_SNIPPETS_DOWNLOAD_SUGGESTIONS_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698