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

Unified Diff: components/search_engines/template_url.h

Issue 2479113002: Make extensions DSE persistent in browser prefs (Closed)
Patch Set: Tests updated(rewritten) after review Created 4 years 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.h
diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h
index 87e6d1c1a4a69923bb3fe55de0b4ff8c874c7660..e0f7a101b2ac05e6d70e15fdb4438c70712fe7d5 100644
--- a/components/search_engines/template_url.h
+++ b/components/search_engines/template_url.h
@@ -512,10 +512,6 @@ class TemplateURL {
// Whether the search engine is supposed to be default.
bool wants_to_be_default_engine;
-
- // Used to resolve conflicts when there are multiple extensions specifying
- // the default search engine. The most recently-installed wins.
- base::Time install_time;
};
explicit TemplateURL(const TemplateURLData& data, Type type = NORMAL);
@@ -535,6 +531,12 @@ class TemplateURL {
const TemplateURLData* data,
const SearchTermsData& search_terms_data);
+ // Special case for search_terms_replacement_key comparison, because of
+ // its special initialization in TemplateUrl constructor.
+ static bool SearchTermsReplacementKeysMatch(
+ const std::string& search_terms_replacement_key1,
+ const std::string& search_terms_replacement_key2);
+
const TemplateURLData& data() const { return data_; }
const base::string16& short_name() const { return data_.short_name(); }
@@ -616,6 +618,10 @@ class TemplateURL {
extension_info_ = std::move(extension_info);
}
+ const AssociatedExtensionInfo* extension_info_for_tests() {
vasilii 2016/12/06 19:16:42 Use either ForTesting suffix or #if defined(UNIT_T
Alexander Yashkin 2016/12/09 08:19:52 Fixed
+ return extension_info_.get();
+ }
+
// Returns true if |url| supports replacement.
bool SupportsReplacement(const SearchTermsData& search_terms_data) const;

Powered by Google App Engine
This is Rietveld 408576698