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

Unified Diff: chrome/browser/search_engines/template_url_prepopulate_data.cc

Issue 308053009: Add contextual search to the template url system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 6 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: chrome/browser/search_engines/template_url_prepopulate_data.cc
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc
index 709531e4bcf1db471572a7b2db16db6c99294afe..fddb309d285fd4d9f8bda7b5607b2a9dc6c78753 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -1065,6 +1065,7 @@ scoped_ptr<TemplateURLData> MakePrepopulatedTemplateURLData(
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,
@@ -1083,6 +1084,7 @@ scoped_ptr<TemplateURLData> MakePrepopulatedTemplateURLData(
data->instant_url = instant_url.as_string();
data->image_url = image_url.as_string();
data->new_tab_url = new_tab_url.as_string();
+ data->contextual_search_url = contextual_search_url.as_string();
data->search_url_post_params = search_url_post_params.as_string();
data->suggestions_url_post_params = suggest_url_post_params.as_string();
data->instant_url_post_params = instant_url_post_params.as_string();
@@ -1137,6 +1139,7 @@ ScopedVector<TemplateURLData> GetPrepopulatedTemplateURLData(
std::string instant_url;
std::string image_url;
std::string new_tab_url;
+ std::string contextual_search_url;
std::string search_url_post_params;
std::string suggest_url_post_params;
std::string instant_url_post_params;
@@ -1148,6 +1151,7 @@ ScopedVector<TemplateURLData> GetPrepopulatedTemplateURLData(
engine->GetString("instant_url", &instant_url);
engine->GetString("image_url", &image_url);
engine->GetString("new_tab_url", &new_tab_url);
+ engine->GetString("contextual_search_url", &contextual_search_url);
engine->GetString("search_url_post_params", &search_url_post_params);
engine->GetString("suggest_url_post_params", &suggest_url_post_params);
engine->GetString("instant_url_post_params", &instant_url_post_params);
@@ -1157,10 +1161,10 @@ ScopedVector<TemplateURLData> GetPrepopulatedTemplateURLData(
&search_terms_replacement_key);
t_urls.push_back(MakePrepopulatedTemplateURLData(name, keyword,
search_url, suggest_url, instant_url, image_url, new_tab_url,
- search_url_post_params, suggest_url_post_params,
- instant_url_post_params, image_url_post_params,
- favicon_url, encoding, *alternate_urls, search_terms_replacement_key,
- id).release());
+ contextual_search_url, search_url_post_params,
+ suggest_url_post_params, instant_url_post_params,
+ image_url_post_params, favicon_url, encoding, *alternate_urls,
+ search_terms_replacement_key, id).release());
}
}
return t_urls.Pass();
@@ -1182,6 +1186,7 @@ scoped_ptr<TemplateURLData>
engine.instant_url,
engine.image_url,
engine.new_tab_url,
+ engine.contextual_search_url,
engine.search_url_post_params,
engine.suggest_url_post_params,
engine.instant_url_post_params,

Powered by Google App Engine
This is Rietveld 408576698