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

Unified Diff: components/search_engines/template_url_service.h

Issue 2487633003: Change behaivor to decide whether a search engine should be shown in the default list (Closed)
Patch Set: Update based on Ian and Peter's comments. Created 4 years, 1 month 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 da7c5169a0f09b3d1ca09bff53e07c62fefc88f4..3ea7ad75b226e56877309b4f8398c4232417a010 100644
--- a/components/search_engines/template_url_service.h
+++ b/components/search_engines/template_url_service.h
@@ -133,6 +133,16 @@ class TemplateURLService : public WebDataServiceConsumer,
const GURL& url,
TemplateURL** template_url_to_replace);
+ // Returns whether the template_url should be shown in the list of engines
Peter Kasting 2016/11/14 19:59:16 Nit: the template_url -> |template_url|
ltian 2016/11/15 19:43:41 Done.
+ // 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).
+ // An TemplateURL will be shown in this list if it is the default search
Peter Kasting 2016/11/14 19:59:16 Nit: I would drop this paragraph, since it's simpl
ltian 2016/11/15 19:43:41 Done.
+ // provider or its prepopulated id is greater than 0 or it is created by
+ // policy. And it should also support search term replacement.
+ bool ShowInDefaultList(const TemplateURL* template_url);
+
// Adds to |matches| all TemplateURLs whose keywords begin with |prefix|,
// sorted shortest-keyword-first. If |supports_replacement_only| is true, only
// TemplateURLs that support replacement are returned.

Powered by Google App Engine
This is Rietveld 408576698