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

Unified Diff: components/search_engines/template_url.h

Issue 424013002: Update the contextual search API to include a parameter specifying whether the server shoudl return… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 6 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
« no previous file with comments | « no previous file | components/search_engines/template_url.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/template_url.h
diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h
index e427b8cd02417469a6a52707c2dce5b51631686f..a01a50e0a66248762b35734b822b357095bb06fe 100644
--- a/components/search_engines/template_url.h
+++ b/components/search_engines/template_url.h
@@ -74,6 +74,7 @@ class TemplateURLRef {
struct ContextualSearchParams {
ContextualSearchParams();
+ // TODO(jeremycho): Delete constructor once Clank no longer depends on it.
ContextualSearchParams(const int version,
const size_t start,
const size_t end,
@@ -81,6 +82,14 @@ class TemplateURLRef {
const std::string& content,
const std::string& base_page_url,
const std::string& encoding);
+ ContextualSearchParams(const int version,
+ const size_t start,
+ const size_t end,
+ const std::string& selection,
+ const std::string& content,
+ const std::string& base_page_url,
+ const std::string& encoding,
+ const bool resolve);
~ContextualSearchParams();
// The version of contextual search.
@@ -103,6 +112,11 @@ class TemplateURLRef {
// The encoding of content.
std::string encoding;
+
+ // If true, the server will generate a search term based on the user
+ // selection and context. Otherwise the user selection will be used as-is
+ // as the search term.
+ bool resolve;
};
// The search terms (query).
« no previous file with comments | « no previous file | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698