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

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: Fix the conflicts 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 68f9eedb13625fe47d816d0637b0a3cec588fb9f..d56bb8d90d070e04e7e3048ec19281438df0b6f1 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|,
@@ -243,6 +244,9 @@ class TemplateURLService : public WebDataServiceConsumer,
const base::string16& keyword,
const std::string& search_url);
+ // Updates the last_visited time of |url| to the current time.
+ void UpdateTemplateURLVisitTime(TemplateURL* url);
+
// Return true if the given |url| can be made the default. This returns false
// regardless of |url| if the default search provider is managed by policy or
// controlled by an extension.
@@ -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);
« no previous file with comments | « chrome/browser/search_engines/template_url_service_android.cc ('k') | components/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698