| 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..16c79ea9f9d349463e9a4d3a884f6ef0d3a79c20 100644
|
| --- a/components/search_engines/template_url.h
|
| +++ b/components/search_engines/template_url.h
|
| @@ -17,6 +17,7 @@
|
| #include "base/time/time.h"
|
| #include "components/metrics/proto/omnibox_event.pb.h"
|
| #include "components/metrics/proto/omnibox_input_type.pb.h"
|
| +#include "components/search_engines/search_engine_type.h"
|
| #include "components/search_engines/template_url_data.h"
|
| #include "components/search_engines/template_url_id.h"
|
| #include "ui/gfx/geometry/size.h"
|
| @@ -644,6 +645,11 @@ class TemplateURL {
|
| // OMNIBOX_API_EXTENSION.
|
| std::string GetExtensionId() const;
|
|
|
| + // Returns the type of this search engine, or SEARCH_ENGINE_OTHER if no
|
| + // 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
|
| @@ -749,6 +755,9 @@ class TemplateURL {
|
| TemplateURLRef contextual_search_url_ref_;
|
| std::unique_ptr<AssociatedExtensionInfo> extension_info_;
|
|
|
| + // Caches the computed engine type across successive calls to GetEngineType().
|
| + mutable SearchEngineType engine_type_;
|
| +
|
| // TODO(sky): Add date last parsed OSD file.
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TemplateURL);
|
|
|