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

Unified Diff: components/ntp_tiles/most_visited_sites.h

Issue 2069263003: MostVisitedSites cleanup: kill SuggestionsPtrVector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
« no previous file with comments | « no previous file | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/most_visited_sites.h
diff --git a/components/ntp_tiles/most_visited_sites.h b/components/ntp_tiles/most_visited_sites.h
index ca7b399413b440e6f06c08460efc24a16476771b..5eebc9bc7d1853bd54f11e9898080b9872b237de 100644
--- a/components/ntp_tiles/most_visited_sites.h
+++ b/components/ntp_tiles/most_visited_sites.h
@@ -161,9 +161,6 @@ class MostVisitedSites : public history::TopSitesObserver,
private:
friend class MostVisitedSitesTest;
- // TODO(treib): use SuggestionsVector in internal functions. crbug.com/601734
- using SuggestionsPtrVector = std::vector<std::unique_ptr<Suggestion>>;
-
void BuildCurrentSuggestions();
// Initialize the query to Top Sites. Called if the SuggestionsService
@@ -183,29 +180,25 @@ class MostVisitedSites : public history::TopSitesObserver,
// Takes the personal suggestions and creates whitelist entry point
// suggestions if necessary.
- SuggestionsPtrVector CreateWhitelistEntryPointSuggestions(
- const SuggestionsPtrVector& personal_suggestions);
+ SuggestionsVector CreateWhitelistEntryPointSuggestions(
+ const SuggestionsVector& personal_suggestions);
// Takes the personal and whitelist suggestions and creates popular
// suggestions if necessary.
- SuggestionsPtrVector CreatePopularSitesSuggestions(
- const SuggestionsPtrVector& personal_suggestions,
- const SuggestionsPtrVector& whitelist_suggestions);
+ SuggestionsVector CreatePopularSitesSuggestions(
+ const SuggestionsVector& personal_suggestions,
+ const SuggestionsVector& whitelist_suggestions);
// Takes the personal suggestions, creates and merges in whitelist and popular
// suggestions if appropriate, and saves the new suggestions.
- void SaveNewSuggestions(SuggestionsPtrVector* personal_suggestions);
+ void SaveNewSuggestions(SuggestionsVector personal_suggestions);
// Workhorse for SaveNewSuggestions above. Implemented as a separate static
// method for ease of testing.
- static SuggestionsPtrVector MergeSuggestions(
- SuggestionsPtrVector* personal_suggestions,
- SuggestionsPtrVector* whitelist_suggestions,
- SuggestionsPtrVector* popular_suggestions);
-
- // Appends suggestions from |src| to |dst|.
- static void AppendSuggestions(SuggestionsPtrVector* src,
- SuggestionsPtrVector* dst);
+ static SuggestionsVector MergeSuggestions(
+ SuggestionsVector personal_suggestions,
+ SuggestionsVector whitelist_suggestions,
+ SuggestionsVector popular_suggestions);
void SaveCurrentSuggestionsToPrefs();
« no previous file with comments | « no previous file | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698