Commit 1c24838a authored by jeremycho's avatar jeremycho Committed by Commit bot

Add ContextualSearchParams constructor to be called when content is passed via...

Add ContextualSearchParams constructor to be called when content is passed via HTTP header and not CGI params.

BUG=376007

Review URL: https://codereview.chromium.org/573063002

Cr-Commit-Position: refs/heads/master@{#295204}
parent c2e821a3
...@@ -204,20 +204,15 @@ TemplateURLRef::SearchTermsArgs::ContextualSearchParams:: ...@@ -204,20 +204,15 @@ TemplateURLRef::SearchTermsArgs::ContextualSearchParams::
TemplateURLRef::SearchTermsArgs::ContextualSearchParams:: TemplateURLRef::SearchTermsArgs::ContextualSearchParams::
ContextualSearchParams( ContextualSearchParams(
const int version, const int version,
const size_t start,
const size_t end,
const std::string& selection, const std::string& selection,
const std::string& content,
const std::string& base_page_url, const std::string& base_page_url,
const std::string& encoding) const bool resolve)
: version(version), : version(version),
start(start), start(base::string16::npos),
end(end), end(base::string16::npos),
selection(selection), selection(selection),
content(content),
base_page_url(base_page_url), base_page_url(base_page_url),
encoding(encoding), resolve(resolve) {
resolve(true) {
} }
TemplateURLRef::SearchTermsArgs::ContextualSearchParams:: TemplateURLRef::SearchTermsArgs::ContextualSearchParams::
......
...@@ -74,14 +74,15 @@ class TemplateURLRef { ...@@ -74,14 +74,15 @@ class TemplateURLRef {
struct ContextualSearchParams { struct ContextualSearchParams {
ContextualSearchParams(); ContextualSearchParams();
// TODO(jeremycho): Delete constructor once Clank no longer depends on it. // Used when the content is sent in the HTTP header instead of as CGI
// parameters.
// TODO(jeremycho): Remove base_page_url and selection parameters once
// they are logged from the HTTP header.
ContextualSearchParams(const int version, ContextualSearchParams(const int version,
const size_t start,
const size_t end,
const std::string& selection, const std::string& selection,
const std::string& content,
const std::string& base_page_url, const std::string& base_page_url,
const std::string& encoding); const bool resolve);
// TODO(jeremycho): Delete constructor once Clank no longer depends on it.
ContextualSearchParams(const int version, ContextualSearchParams(const int version,
const size_t start, const size_t start,
const size_t end, const size_t end,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment