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

Unified Diff: components/search_engines/template_url_parser.cc

Issue 2487633003: Change behaivor to decide whether a search engine should be shown in the default list (Closed)
Patch Set: Update based on Peter and Nicolas'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_parser.cc
diff --git a/components/search_engines/template_url_parser.cc b/components/search_engines/template_url_parser.cc
index e3eec92f67d54ad73816851fa771332f1518a6eb..9d051056be59053399fba867444e4e8b733f3fd1 100644
--- a/components/search_engines/template_url_parser.cc
+++ b/components/search_engines/template_url_parser.cc
@@ -146,8 +146,7 @@ class TemplateURLParsingContext {
// the resulting URL was not HTTP[S], a name wasn't supplied, a resulting
// TemplateURLRef was invalid, etc.).
std::unique_ptr<TemplateURL> GetTemplateURL(
- const SearchTermsData& search_terms_data,
- bool show_in_default_list);
+ const SearchTermsData& search_terms_data);
private:
// Key is UTF8 encoded.
@@ -302,8 +301,7 @@ void TemplateURLParsingContext::CharactersImpl(void* ctx,
}
std::unique_ptr<TemplateURL> TemplateURLParsingContext::GetTemplateURL(
- const SearchTermsData& search_terms_data,
- bool show_in_default_list) {
+ const SearchTermsData& search_terms_data) {
// TODO(jcampan): Support engines that use POST; see http://crbug.com/18107
if (method_ == TemplateURLParsingContext::POST ||
data_.short_name().empty() || !IsHTTPRef(data_.url()) ||
@@ -323,8 +321,6 @@ std::unique_ptr<TemplateURL> TemplateURLParsingContext::GetTemplateURL(
if (!has_custom_keyword_)
data_.SetKeyword(TemplateURL::GenerateKeyword(search_url));
- data_.show_in_default_list = show_in_default_list;
-
// Bail if the search URL is empty or if either TemplateURLRef is invalid.
std::unique_ptr<TemplateURL> template_url =
base::MakeUnique<TemplateURL>(data_);
@@ -495,7 +491,6 @@ TemplateURLParsingContext::ElementType
// static
std::unique_ptr<TemplateURL> TemplateURLParser::Parse(
const SearchTermsData& search_terms_data,
- bool show_in_default_list,
const char* data,
size_t length,
TemplateURLParser::ParameterFilter* param_filter) {
@@ -514,6 +509,5 @@ std::unique_ptr<TemplateURL> TemplateURLParser::Parse(
static_cast<int>(length));
xmlSubstituteEntitiesDefault(last_sub_entities_value);
- return error ? nullptr : context.GetTemplateURL(search_terms_data,
- show_in_default_list);
+ return error ? nullptr : context.GetTemplateURL(search_terms_data);
}
« no previous file with comments | « components/search_engines/template_url_parser.h ('k') | components/search_engines/template_url_prepopulate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698