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

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

Issue 22945004: InstantExtended: Add new_tab_url to TemplateURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 b9165e1cb68de86330dfd74fb9847204cb8b4524..d7020a11bdca792a7d6d6d09b0fbce5fd91b3bcc 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -1077,6 +1077,7 @@ TemplateURL* MakePrepopulatedTemplateURL(
const base::StringPiece& suggest_url,
const base::StringPiece& instant_url,
const base::StringPiece& image_url,
+ const base::StringPiece& new_tab_url,
const base::StringPiece& search_url_post_params,
const base::StringPiece& suggest_url_post_params,
const base::StringPiece& instant_url_post_params,
@@ -1095,6 +1096,7 @@ TemplateURL* MakePrepopulatedTemplateURL(
data.suggestions_url = suggest_url.as_string();
data.instant_url = instant_url.as_string();
data.image_url = image_url.as_string();
+ data.new_tab_url = new_tab_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();
@@ -1148,6 +1150,7 @@ void GetPrepopulatedTemplateFromPrefs(Profile* profile,
std::string suggest_url;
std::string instant_url;
std::string image_url;
+ std::string new_tab_url;
std::string search_url_post_params;
std::string suggest_url_post_params;
std::string instant_url_post_params;
@@ -1158,6 +1161,7 @@ void GetPrepopulatedTemplateFromPrefs(Profile* profile,
engine->GetString("suggest_url", &suggest_url);
engine->GetString("instant_url", &instant_url);
engine->GetString("image_url", &image_url);
+ engine->GetString("new_tab_url", &new_tab_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);
@@ -1166,7 +1170,7 @@ void GetPrepopulatedTemplateFromPrefs(Profile* profile,
engine->GetString("search_terms_replacement_key",
&search_terms_replacement_key);
t_urls->push_back(MakePrepopulatedTemplateURL(profile, name, keyword,
- search_url, suggest_url, instant_url, image_url,
+ 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,
@@ -1188,10 +1192,11 @@ TemplateURL* MakePrepopulatedTemplateURLFromPrepopulateEngine(
return MakePrepopulatedTemplateURL(profile, WideToUTF16(engine.name),
WideToUTF16(engine.keyword), engine.search_url, engine.suggest_url,
- engine.instant_url, engine.image_url, engine.search_url_post_params,
- engine.suggest_url_post_params, engine.instant_url_post_params,
- engine.image_url_post_params, engine.favicon_url, engine.encoding,
- alternate_urls, engine.search_terms_replacement_key, engine.id);
+ engine.instant_url, engine.image_url, engine.new_tab_url,
+ engine.search_url_post_params, engine.suggest_url_post_params,
+ engine.instant_url_post_params, engine.image_url_post_params,
+ engine.favicon_url, engine.encoding, alternate_urls,
+ engine.search_terms_replacement_key, engine.id);
}
bool SameDomain(const GURL& given_url, const GURL& prepopulated_url) {
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698