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

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: Removed logic to check search_terms_replacement_key in template_url.cc. This is for a next CL. 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 2e89118da58dcdcbfc665d434b90ebc73160e3b8..43c065bb95c9bab3b9ddb2a19b15149553892feb 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -159,6 +159,7 @@ class TemplateURLRef {
GOOGLE_BASE_SUGGEST_URL,
GOOGLE_INSTANT_ENABLED,
GOOGLE_INSTANT_EXTENDED_ENABLED,
+ GOOGLE_INSTANT_EXTENDED_ENABLED_KEY,
GOOGLE_ORIGINAL_QUERY_FOR_SUGGESTION,
GOOGLE_RLZ,
GOOGLE_SEARCH_CLIENT,
@@ -347,6 +348,13 @@ 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,
+ // 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.
@@ -398,6 +406,10 @@ class TemplateURL {
const GURL& originating_url() const { return data_.originating_url; }
+ const std::string& search_terms_replacement_key() const {
+ return data_.search_terms_replacement_key;
+ }
+
bool show_in_default_list() const { return data_.show_in_default_list; }
// Returns true if show_in_default_list() is true and this TemplateURL has a
// TemplateURLRef that supports replacement.

Powered by Google App Engine
This is Rietveld 408576698