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

Unified Diff: components/search_engines/template_url.h

Issue 1983773002: Cache SearchEngineType of TemplateURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-extracting-terms-from-template-url
Patch Set: Created 4 years, 7 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.h
diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h
index 2acb146851887d0f8246dbf56c4b60071374d097..6063e8b6efab3ba694a63955d3175bf1164b52d3 100644
--- a/components/search_engines/template_url.h
+++ b/components/search_engines/template_url.h
@@ -644,6 +644,11 @@ class TemplateURL {
// OMNIBOX_API_EXTENSION.
std::string GetExtensionId() const;
+ // Returns the type of the provided engine, or SEARCH_ENGINE_OTHER if no
Peter Kasting 2016/05/17 04:43:04 "the provided engine" is meaningless since this do
Vitaly Baranov 2016/06/03 15:31:45 Done.
+ // engines match.
+ SearchEngineType GetEngineType(
+ const SearchTermsData& search_terms_data) const;
+
// Use the alternate URLs and the search URL to match the provided |url|
// and extract |search_terms| from it. Returns false and an empty
// |search_terms| if no search terms can be matched. The order in which the
@@ -748,6 +753,7 @@ class TemplateURL {
TemplateURLRef new_tab_url_ref_;
TemplateURLRef contextual_search_url_ref_;
std::unique_ptr<AssociatedExtensionInfo> extension_info_;
+ mutable SearchEngineType engine_type_;
Peter Kasting 2016/05/17 04:43:04 I think it's confusing for there to be an engine_t
Vitaly Baranov 2016/06/03 15:31:45 Done. And field TemplateURLData::engine_type_ is m
// TODO(sky): Add date last parsed OSD file.

Powered by Google App Engine
This is Rietveld 408576698