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

Unified Diff: components/ntp_snippets/remote/ntp_snippets_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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/remote/ntp_snippets_service.h
diff --git a/components/ntp_snippets/remote/ntp_snippets_service.h b/components/ntp_snippets/remote/ntp_snippets_service.h
index 5d51ea067d53eabcd2a179346c53af574fc9ba64..ced6ebaef052c04bf95ecd667eb5acea916486b2 100644
--- a/components/ntp_snippets/remote/ntp_snippets_service.h
+++ b/components/ntp_snippets/remote/ntp_snippets_service.h
@@ -119,7 +119,7 @@ class NTPSnippetsService final : public ContentSuggestionsProvider,
const ImageFetchedCallback& callback) override;
void Fetch(const Category& category,
const std::set<std::string>& known_suggestion_ids,
- FetchingCallback callback) override;
+ const FetchingCallback& callback) override;
void ClearHistory(
base::Time begin,
base::Time end,
@@ -350,9 +350,8 @@ class NTPSnippetsService final : public ContentSuggestionsProvider,
~CategoryContent();
CategoryContent& operator=(CategoryContent&&);
};
- using CategoryContentMap =
- std::map<Category, CategoryContent, Category::CompareByID>;
- CategoryContentMap categories_;
+
+ std::map<Category, CategoryContent, Category::CompareByID> categories_;
// The ISO 639-1 code of the language used by the application.
const std::string application_language_code_;

Powered by Google App Engine
This is Rietveld 408576698