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

Unified Diff: chrome/browser/search_engines/template_url.h

Issue 11552020: Add search_terms_replacement_key field to TemplateURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered PK's comments. Created 8 years 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.h
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h
index 6fba137da66816fb4c5a162cfa714bbdfebd6b68..b57b899a31b5a119ce506374a7ce41982a29c8c9 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -352,6 +352,12 @@ struct TemplateURLData {
// search terms from a URL.
std::vector<std::string> alternate_urls;
+ // A parameter that, if present and non-zero in a search_url or instant_url,
akalin 2012/12/20 17:13:59 what exactly does 'non-zero' mean? Do you mean 'n
Peter Kasting 2012/12/20 19:09:29 This was my same question. See the earlier exchan
akalin 2012/12/20 19:41:26 I see. I still think it should be clarified. So
Peter Kasting 2012/12/20 19:43:17 It's sounding from David's answer like we can scra
beaudoin 2013/01/03 18:49:40 Changed to "present in the query or ref". Done.
+ // causes Chrome to replace the URL with the search term.
+ // The parameter must be in the query if the search terms are in the query,
+ // and in the ref if the search terms are in the ref.
+ std::string search_terms_replacement_key;
+
private:
// Private so we can enforce using the setters and thus enforce that these
// fields are never empty.
@@ -427,6 +433,10 @@ class TemplateURL {
const std::string& sync_guid() const { return data_.sync_guid; }
+ const std::string& search_terms_replacement_key() const {
+ return data_.search_terms_replacement_key;
+ }
+
const TemplateURLRef& url_ref() const { return url_ref_; }
const TemplateURLRef& suggestions_url_ref() const {
return suggestions_url_ref_;

Powered by Google App Engine
This is Rietveld 408576698