OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |