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

Unified Diff: components/search_engines/template_url_service.h

Issue 2555513003: [Android] Sort custom search engines based on last visited time and display only top 3 most recentl… (Closed)
Patch Set: Update based on Ted's comments. Created 4 years 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/search_engines/template_url_service.h
diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h
index b387f7bef8f1d5ac6cf201e83d1c83e47ffe7036..eaa6e47e75a0f3e91bfe7e78031422096a2ebaf7 100644
--- a/components/search_engines/template_url_service.h
+++ b/components/search_engines/template_url_service.h
@@ -137,10 +137,11 @@ class TemplateURLService : public WebDataServiceConsumer,
// prepopulate list or created by policy.
bool IsPrepopulatedOrCreatedByPolicy(const TemplateURL* template_url);
- // Returns whether |template_url| is the current default or return true for
- // IsPrepopulatedOrCreatedByPolicy(). This is meant to highlight the current,
- // default, as well as the other most likely choices of default engine,
- // separately from a full list of all TemplateURLs (which might be very long).
+ // Returns whether |template_url| should be shown in the list of engines
+ // most likely to be selected as a default engine. This is meant to highlight
+ // the current default, as well as the other most likely choices of default
+ // engine, separately from a full list of all TemplateURLs (which might be
+ // very long).
bool ShowInDefaultList(const TemplateURL* template_url);
// Adds to |matches| all TemplateURLs whose keywords begin with |prefix|,
@@ -377,6 +378,9 @@ class TemplateURLService : public WebDataServiceConsumer,
static syncer::SyncData CreateSyncDataFromTemplateURL(
const TemplateURL& turl);
+ // Updates the last_visited time of |url| to the current time.
+ void UpdateTemplateURLVisitTime(TemplateURL* url);
Peter Kasting 2016/12/16 08:37:18 Nit: If you're going to move this, you need to mov
+
// Creates a new heap-allocated TemplateURL* which is populated by overlaying
// |sync_data| atop |existing_turl|. |existing_turl| may be NULL; if not it
// remains unmodified. The caller owns the returned TemplateURL*.
@@ -569,9 +573,6 @@ class TemplateURLService : public WebDataServiceConsumer,
// SetKeywordSearchTermsForURL is invoked.
void UpdateKeywordSearchTermsForURL(const URLVisitedDetails& details);
- // Updates the last_visited time of |url| to the current time.
- void UpdateTemplateURLVisitTime(TemplateURL* url);
-
// If necessary, generates a visit for the site http:// + t_url.keyword().
void AddTabToSearchVisit(const TemplateURL& t_url);

Powered by Google App Engine
This is Rietveld 408576698