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

Unified Diff: components/search_engines/template_url.cc

Issue 2639153002: Make extensions DSE persistent in browser prefs (Reland) (Closed)
Patch Set: Rebased and updated after review, use new keyword conflicts resolution Created 3 years, 10 months 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.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);

Powered by Google App Engine
This is Rietveld 408576698