Index: components/search_engines/template_url.cc |
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc |
index 016e0c5412ff634559c044e889fa7d0531901135..5e4dd451c63b806d49f9578ae05c2bc82a1f688e 100644 |
--- a/components/search_engines/template_url.cc |
+++ b/components/search_engines/template_url.cc |
@@ -165,22 +165,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& search_terms_replacement_key1, |
- const std::string& search_terms_replacement_key2) { |
- if (search_terms_replacement_key1 == search_terms_replacement_key2) |
- return true; |
- if (search_terms_replacement_key1 == google_util::kInstantExtendedAPIParam && |
- search_terms_replacement_key2 == kGoogleInstantExtendedEnabledKeyFull) |
- return true; |
- if (search_terms_replacement_key2 == google_util::kInstantExtendedAPIParam && |
- search_terms_replacement_key1 == kGoogleInstantExtendedEnabledKeyFull) |
- return true; |
- return false; |
-} |
- |
} // namespace |
@@ -1281,6 +1265,19 @@ bool TemplateURL::MatchesData(const TemplateURL* t_url, |
data->search_terms_replacement_key); |
} |
+// static |
+bool TemplateURL::SearchTermsReplacementKeysMatch( |
+ const std::string& search_terms_replacement_key1, |
+ const std::string& search_terms_replacement_key2) { |
+ if (search_terms_replacement_key1 == google_util::kInstantExtendedAPIParam && |
+ search_terms_replacement_key2 == kGoogleInstantExtendedEnabledKeyFull) |
+ return true; |
+ if (search_terms_replacement_key2 == google_util::kInstantExtendedAPIParam && |
+ search_terms_replacement_key1 == kGoogleInstantExtendedEnabledKeyFull) |
+ return true; |
+ return search_terms_replacement_key1 == search_terms_replacement_key2; |
+} |
+ |
base::string16 TemplateURL::AdjustedShortNameForLocaleDirection() const { |
base::string16 bidi_safe_short_name = data_.short_name(); |
base::i18n::AdjustStringForLocaleDirection(&bidi_safe_short_name); |