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

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

Issue 17022004: Replace --google-base-suggest-url and --instant-url with --google-base-url. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome/browser/search_engines/search_terms_data.cc ('k') | chrome/browser/search_engines/template_url.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url.h
===================================================================
--- chrome/browser/search_engines/template_url.h (revision 208572)
+++ chrome/browser/search_engines/template_url.h (working copy)
@@ -58,9 +58,11 @@
~SearchTermsArgs();
// The search terms (query).
- const string16 search_terms;
+ string16 search_terms;
+
// The original (input) query.
string16 original_query;
+
// The optional assisted query stats, aka AQS, used for logging purposes.
// This string contains impressions of all autocomplete matches shown
// at the query submission time. For privacy reasons, we require the
@@ -83,6 +85,15 @@
// The URL of the current webpage to be used for experimental zero-prefix
// suggestions.
std::string zero_prefix_url;
+
+ // If set, ReplaceSearchTerms() will automatically append any extra query
+ // params specified via the --extra-search-query-params command-line
+ // argument. Generally, this should be set when dealing with the search or
+ // instant TemplateURLRefs of the default search engine and the caller cares
+ // about the query portion of the URL. Since neither TemplateURLRef nor
+ // indeed TemplateURL know whether a TemplateURL is the default search
+ // engine, callers instead must set this manually.
+ bool append_extra_query_params;
};
TemplateURLRef(TemplateURL* owner, Type type);
@@ -244,6 +255,13 @@
void ParseHostAndSearchTermKey(
const SearchTermsData& search_terms_data) const;
+ // Replaces all replacements in |parsed_url_| with their actual values and
+ // returns the result. This is the main functionality of
+ // ReplaceSearchTermsUsingTermsData().
+ std::string HandleReplacements(
+ const SearchTermsArgs& search_terms_args,
+ const SearchTermsData& search_terms_data) const;
+
// The TemplateURL that contains us. This should outlive us.
TemplateURL* const owner_;
« no previous file with comments | « chrome/browser/search_engines/search_terms_data.cc ('k') | chrome/browser/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698