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

Side by Side Diff: components/search_engines/template_url.h

Issue 573063002: Add ContextualSearchParams constructor to be called when content is passed via HTTP header and not … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/search_engines/template_url.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // This struct encapsulates arguments passed to 68 // This struct encapsulates arguments passed to
69 // TemplateURLRef::ReplaceSearchTerms methods. By default, only search_terms 69 // TemplateURLRef::ReplaceSearchTerms methods. By default, only search_terms
70 // is required and is passed in the constructor. 70 // is required and is passed in the constructor.
71 struct SearchTermsArgs { 71 struct SearchTermsArgs {
72 explicit SearchTermsArgs(const base::string16& search_terms); 72 explicit SearchTermsArgs(const base::string16& search_terms);
73 ~SearchTermsArgs(); 73 ~SearchTermsArgs();
74 74
75 struct ContextualSearchParams { 75 struct ContextualSearchParams {
76 ContextualSearchParams(); 76 ContextualSearchParams();
77 // Used when the content is sent in the HTTP header instead of as CGI
78 // parameters.
79 // TODO(jeremycho): Remove base_page_url and selection parameters once
80 // they are logged from the HTTP header.
81 ContextualSearchParams(const int version,
82 const std::string& selection,
83 const std::string& base_page_url,
84 const bool resolve);
77 // TODO(jeremycho): Delete constructor once Clank no longer depends on it. 85 // TODO(jeremycho): Delete constructor once Clank no longer depends on it.
78 ContextualSearchParams(const int version, 86 ContextualSearchParams(const int version,
79 const size_t start, 87 const size_t start,
80 const size_t end, 88 const size_t end,
81 const std::string& selection,
82 const std::string& content,
83 const std::string& base_page_url,
84 const std::string& encoding);
85 ContextualSearchParams(const int version,
86 const size_t start,
87 const size_t end,
88 const std::string& selection, 89 const std::string& selection,
89 const std::string& content, 90 const std::string& content,
90 const std::string& base_page_url, 91 const std::string& base_page_url,
91 const std::string& encoding, 92 const std::string& encoding,
92 const bool resolve); 93 const bool resolve);
93 ~ContextualSearchParams(); 94 ~ContextualSearchParams();
94 95
95 // The version of contextual search. 96 // The version of contextual search.
96 int version; 97 int version;
97 98
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 TemplateURLRef new_tab_url_ref_; 719 TemplateURLRef new_tab_url_ref_;
719 TemplateURLRef contextual_search_url_ref_; 720 TemplateURLRef contextual_search_url_ref_;
720 scoped_ptr<AssociatedExtensionInfo> extension_info_; 721 scoped_ptr<AssociatedExtensionInfo> extension_info_;
721 722
722 // TODO(sky): Add date last parsed OSD file. 723 // TODO(sky): Add date last parsed OSD file.
723 724
724 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 725 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
725 }; 726 };
726 727
727 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 728 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW
« 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