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

Side by Side Diff: components/ntp_snippets/content_suggestions_service.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_CONTENT_SUGGESTIONS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 16 matching lines...) Expand all
27 class PrefService; 27 class PrefService;
28 class PrefRegistrySimple; 28 class PrefRegistrySimple;
29 29
30 namespace gfx { 30 namespace gfx {
31 class Image; 31 class Image;
32 } // namespace gfx 32 } // namespace gfx
33 33
34 namespace ntp_snippets { 34 namespace ntp_snippets {
35 35
36 class NTPSnippetsService; 36 class NTPSnippetsService;
37 class NTPSnippetsFetcher;
38 37
39 // Retrieves suggestions from a number of ContentSuggestionsProviders and serves 38 // Retrieves suggestions from a number of ContentSuggestionsProviders and serves
40 // them grouped into categories. There can be at most one provider per category. 39 // them grouped into categories. There can be at most one provider per category.
41 class ContentSuggestionsService : public KeyedService, 40 class ContentSuggestionsService : public KeyedService,
42 public ContentSuggestionsProvider::Observer, 41 public ContentSuggestionsProvider::Observer,
43 public history::HistoryServiceObserver { 42 public history::HistoryServiceObserver {
44 public: 43 public:
45 // TODO(treib): All these should probably be OnceCallback. 44 // TODO(treib): All these should probably be OnceCallback.
46 using ImageFetchedCallback = base::Callback<void(const gfx::Image&)>; 45 using ImageFetchedCallback = base::Callback<void(const gfx::Image&)>;
47 using DismissedSuggestionsCallback = base::Callback<void( 46 using DismissedSuggestionsCallback = base::Callback<void(
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 PrefService* pref_service_; 303 PrefService* pref_service_;
305 304
306 UserClassifier user_classifier_; 305 UserClassifier user_classifier_;
307 306
308 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService); 307 DISALLOW_COPY_AND_ASSIGN(ContentSuggestionsService);
309 }; 308 };
310 309
311 } // namespace ntp_snippets 310 } // namespace ntp_snippets
312 311
313 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ 312 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698