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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/content_suggestions_service.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index 642f77078b7c5504f5c8ff4cc97c0a4ab9adeff0..fde76b9b49c85c6d697736d9ab178a10278a727a 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -30,7 +30,7 @@ ContentSuggestionsService::ContentSuggestionsService(
history_service_observer_.Add(history_service);
}
-ContentSuggestionsService::~ContentSuggestionsService() {}
+ContentSuggestionsService::~ContentSuggestionsService() = default;
void ContentSuggestionsService::Shutdown() {
ntp_snippets_service_ = nullptr;
@@ -193,7 +193,7 @@ void ContentSuggestionsService::RegisterProvider(
void ContentSuggestionsService::OnNewSuggestions(
ContentSuggestionsProvider* provider,
Category category,
- std::vector<ContentSuggestion> new_suggestions) {
Marc Treib 2016/09/23 16:42:44 To match the declaration in the header
+ std::vector<ContentSuggestion> suggestions) {
if (RegisterCategoryIfRequired(provider, category))
NotifyCategoryStatusChanged(category);
@@ -205,10 +205,10 @@ void ContentSuggestionsService::OnNewSuggestions(
id_category_map_.erase(suggestion.id());
}
- for (const ContentSuggestion& suggestion : new_suggestions)
+ for (const ContentSuggestion& suggestion : suggestions)
id_category_map_.insert(std::make_pair(suggestion.id(), category));
- suggestions_by_category_[category] = std::move(new_suggestions);
+ suggestions_by_category_[category] = std::move(suggestions);
// The positioning of the bookmarks category depends on whether it's empty.
// TODO(treib): Remove this temporary hack, crbug.com/640568.

Powered by Google App Engine
This is Rietveld 408576698