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

Unified Diff: chrome/browser/search_engines/template_url_service_android.h

Issue 2555513003: [Android] Sort custom search engines based on last visited time and display only top 3 most recentl… (Closed)
Patch Set: 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: chrome/browser/search_engines/template_url_service_android.h
diff --git a/chrome/browser/search_engines/template_url_service_android.h b/chrome/browser/search_engines/template_url_service_android.h
index f140e5930718d98d4862f2e2367e5b29452b6154..c4303aa6083c5e692fe18ab00007f2e1329e33b2 100644
--- a/chrome/browser/search_engines/template_url_service_android.h
+++ b/chrome/browser/search_engines/template_url_service_android.h
@@ -89,9 +89,15 @@ class TemplateUrlServiceAndroid : public TemplateURLServiceObserver {
// Updates |template_urls_| to contain all TemplateURLs. It sorts this list
// with prepopulated engines first, then any default non-prepopulated engine,
- // then other non-prepopulated engines.
+ // then other non-prepopulated engines based on last_visited in the
Peter Kasting 2016/12/06 06:24:55 Nit: remove "the"
ltian 2016/12/07 00:56:43 Done.
+ // descending order.
void LoadTemplateURLs();
+ // Counts the number of custom search engine needed to be remove from
+ // |template_urls_|. Android only shows top 5 most recently visited engines,
+ // the rest of custom search engine will be removed from |template_urls_|.
+ int CountRemovedSearchEngineNum();
+
JavaObjectWeakGlobalRef weak_java_obj_;
// Pointer to the TemplateUrlService for the main profile.

Powered by Google App Engine
This is Rietveld 408576698