Index: components/search_engines/template_url_data.h |
diff --git a/components/search_engines/template_url_data.h b/components/search_engines/template_url_data.h |
index 8036bc77729a658b9d097ad56b7ae46a520ef425..8f42e0f11557ff322916c9f7a02f485753741701 100644 |
--- a/components/search_engines/template_url_data.h |
+++ b/components/search_engines/template_url_data.h |
@@ -13,12 +13,38 @@ |
#include "components/search_engines/template_url_id.h" |
#include "url/gurl.h" |
+namespace base { |
+class ListValue; |
+} |
+ |
// The data for the TemplateURL. Separating this into its own class allows most |
// users to do SSA-style usage of TemplateURL: construct a TemplateURLData with |
// whatever fields are desired, then create an immutable TemplateURL from it. |
struct TemplateURLData { |
TemplateURLData(); |
TemplateURLData(const TemplateURLData& other); |
+ // Creates a TemplateURLData suitable for prepopulated engines. |
+ // Note that unlike in the default constructor, |safe_for_autoreplace| will |
+ // be set to true. date_created and last_modified will be set to null time |
+ // value, instead of current time. |
+ TemplateURLData(const base::string16& name, |
+ const base::string16& keyword, |
+ const base::StringPiece& search_url, |
Peter Kasting
2016/11/21 21:03:54
Prefer to pass StringPiece by value (see https://c
|
+ const base::StringPiece& suggest_url, |
+ const base::StringPiece& instant_url, |
+ const base::StringPiece& image_url, |
+ const base::StringPiece& new_tab_url, |
+ const base::StringPiece& contextual_search_url, |
+ const base::StringPiece& search_url_post_params, |
+ const base::StringPiece& suggest_url_post_params, |
+ const base::StringPiece& instant_url_post_params, |
+ const base::StringPiece& image_url_post_params, |
+ const base::StringPiece& favicon_url, |
+ const base::StringPiece& encoding, |
+ const base::ListValue& alternate_urls_list, |
+ const base::StringPiece& search_terms_replacement_key, |
+ int prepopulate_id); |
+ |
~TemplateURLData(); |
// A short description of the template. This is the name we show to the user |