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

Unified Diff: chrome/browser/search_engines/template_url.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.cc
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
index 3d0bea91f209411bd9a1b560b051dcfc5137ab7d..a0a7c63d3c9c387c7ba09fcb0152de82ddba9332 100644
--- a/chrome/browser/search_engines/template_url.cc
+++ b/chrome/browser/search_engines/template_url.cc
@@ -238,6 +238,7 @@ std::string TemplateURLRef::GetURL() const {
case SUGGEST: return owner_->suggestions_url();
case INSTANT: return owner_->instant_url();
case IMAGE: return owner_->image_url();
+ case NEW_TAB: return owner_->new_tab_url();
case INDEXED: return owner_->GetURL(index_in_owner_);
default: NOTREACHED(); return std::string(); // NOLINT
}
@@ -249,6 +250,7 @@ std::string TemplateURLRef::GetPostParamsString() const {
case SEARCH: return owner_->search_url_post_params();
case SUGGEST: return owner_->suggestions_url_post_params();
case INSTANT: return owner_->instant_url_post_params();
+ case NEW_TAB: return std::string();
case IMAGE: return owner_->image_url_post_params();
default: NOTREACHED(); return std::string(); // NOLINT
}
@@ -1009,7 +1011,8 @@ TemplateURL::TemplateURL(Profile* profile, const TemplateURLData& data)
TemplateURLRef::SUGGEST),
instant_url_ref_(this,
TemplateURLRef::INSTANT),
- image_url_ref_(this, TemplateURLRef::IMAGE) {
+ image_url_ref_(this, TemplateURLRef::IMAGE),
+ new_tab_url_ref_(this, TemplateURLRef::NEW_TAB) {
SetPrepopulateId(data_.prepopulate_id);
if (data_.search_terms_replacement_key ==
« no previous file with comments | « chrome/browser/search_engines/template_url.h ('k') | chrome/browser/search_engines/template_url_prepopulate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698