| Index: components/search_engines/template_url_service.cc
|
| diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc
|
| index ee12247b7e05e9ee6eb700c5464e914503b57d10..56ec6a55ba74fbd2b7135b78aebca554a59c55fd 100644
|
| --- a/components/search_engines/template_url_service.cc
|
| +++ b/components/search_engines/template_url_service.cc
|
| @@ -413,6 +413,10 @@ void TemplateURLService::AddMatchingDomainKeywords(
|
| matches);
|
| }
|
|
|
| +bool TemplateURLService::IsInDefaultList(const TemplateURL* t_url) {
|
| + return t_url->prepopulate_id() > 0 || t_url->created_by_policy();
|
| +}
|
| +
|
| TemplateURL* TemplateURLService::GetTemplateURLForKeyword(
|
| const base::string16& keyword) {
|
| KeywordToTURLAndMeaningfulLength::const_iterator elem(
|
| @@ -1642,7 +1646,7 @@ bool TemplateURLService::CanAddAutogeneratedKeywordForHost(
|
| }
|
|
|
| bool TemplateURLService::CanReplace(const TemplateURL* t_url) {
|
| - return (t_url != default_search_provider_ && !t_url->show_in_default_list() &&
|
| + return (t_url != default_search_provider_ && !IsInDefaultList(t_url) &&
|
| t_url->safe_for_autoreplace());
|
| }
|
|
|
|
|