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

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: 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..6e0c0379ba47f1949cb044d2badfeecddf706a80 100644
--- a/chrome/browser/search_engines/template_url.cc
+++ b/chrome/browser/search_engines/template_url.cc
@@ -239,6 +239,7 @@ std::string TemplateURLRef::GetURL() const {
case INSTANT: return owner_->instant_url();
case IMAGE: return owner_->image_url();
case INDEXED: return owner_->GetURL(index_in_owner_);
+ case NEW_TAB: return owner_->new_tab_url();
default: NOTREACHED(); return std::string(); // NOLINT
}
}
@@ -250,6 +251,7 @@ std::string TemplateURLRef::GetPostParamsString() const {
case SUGGEST: return owner_->suggestions_url_post_params();
case INSTANT: return owner_->instant_url_post_params();
case IMAGE: return owner_->image_url_post_params();
+ case NEW_TAB: return std::string();
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 ==

Powered by Google App Engine
This is Rietveld 408576698