| Index: components/search_engines/template_url.cc
|
| diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
|
| index a65e305599d8622726ace7d5fb47b16b34d8afa1..da62aaa3c13bf3af09da2e8888ad0289aa3402da 100644
|
| --- a/components/search_engines/template_url.cc
|
| +++ b/components/search_engines/template_url.cc
|
| @@ -160,17 +160,6 @@ bool IsTemplateParameterString(const std::string& param) {
|
| (*(param.rbegin()) == kEndParameter);
|
| }
|
|
|
| -// Special case for search_terms_replacement_key comparison, because of
|
| -// its special initialization in TemplateUrl constructor.
|
| -bool SearchTermsReplacementKeysMatch(const std::string& key1,
|
| - const std::string& key2) {
|
| - const auto IsInstantExtended = [](const std::string& key) {
|
| - return (key == google_util::kInstantExtendedAPIParam) ||
|
| - (key == google_util::kGoogleInstantExtendedEnabledKeyFull);
|
| - };
|
| - return (key1 == key2) || (IsInstantExtended(key1) && IsInstantExtended(key2));
|
| -}
|
| -
|
| } // namespace
|
|
|
| // TemplateURLRef::SearchTermsArgs --------------------------------------------
|
| @@ -1234,6 +1223,17 @@ bool TemplateURL::MatchesData(const TemplateURL* t_url,
|
| data->search_terms_replacement_key);
|
| }
|
|
|
| +// Special case for search_terms_replacement_key comparison, because of
|
| +// its special initialization in TemplateUrl constructor.
|
| +bool TemplateURL::SearchTermsReplacementKeysMatch(const std::string& key1,
|
| + const std::string& key2) {
|
| + const auto IsInstantExtended = [](const std::string& key) {
|
| + return (key == google_util::kInstantExtendedAPIParam) ||
|
| + (key == google_util::kGoogleInstantExtendedEnabledKeyFull);
|
| + };
|
| + return (key1 == key2) || (IsInstantExtended(key1) && IsInstantExtended(key2));
|
| +}
|
| +
|
| base::string16 TemplateURL::AdjustedShortNameForLocaleDirection() const {
|
| base::string16 bidi_safe_short_name = data_.short_name();
|
| base::i18n::AdjustStringForLocaleDirection(&bidi_safe_short_name);
|
|
|