OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 6 #define CHROME_BROWSER_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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // The URL of the current webpage to be used for experimental zero-prefix | 98 // The URL of the current webpage to be used for experimental zero-prefix |
99 // suggestions. | 99 // suggestions. |
100 std::string current_page_url; | 100 std::string current_page_url; |
101 | 101 |
102 // Which omnibox the user used to type the prefix. | 102 // Which omnibox the user used to type the prefix. |
103 AutocompleteInput::PageClassification page_classification; | 103 AutocompleteInput::PageClassification page_classification; |
104 | 104 |
105 // True for searches issued with the bookmark bar pref set to shown. | 105 // True for searches issued with the bookmark bar pref set to shown. |
106 bool bookmark_bar_pinned; | 106 bool bookmark_bar_pinned; |
107 | 107 |
| 108 // Optional session token. |
| 109 std::string session_token; |
| 110 |
108 // Additional query params provided by the suggest server. | 111 // Additional query params provided by the suggest server. |
109 std::string suggest_query_params; | 112 std::string suggest_query_params; |
110 | 113 |
111 // If set, ReplaceSearchTerms() will automatically append any extra query | 114 // If set, ReplaceSearchTerms() will automatically append any extra query |
112 // params specified via the --extra-search-query-params command-line | 115 // params specified via the --extra-search-query-params command-line |
113 // argument. Generally, this should be set when dealing with the search or | 116 // argument. Generally, this should be set when dealing with the search or |
114 // instant TemplateURLRefs of the default search engine and the caller cares | 117 // instant TemplateURLRefs of the default search engine and the caller cares |
115 // about the query portion of the URL. Since neither TemplateURLRef nor | 118 // about the query portion of the URL. Since neither TemplateURLRef nor |
116 // indeed TemplateURL know whether a TemplateURL is the default search | 119 // indeed TemplateURL know whether a TemplateURL is the default search |
117 // engine, callers instead must set this manually. | 120 // engine, callers instead must set this manually. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 GOOGLE_IMAGE_URL, | 269 GOOGLE_IMAGE_URL, |
267 GOOGLE_FORCE_INSTANT_RESULTS, | 270 GOOGLE_FORCE_INSTANT_RESULTS, |
268 GOOGLE_INSTANT_EXTENDED_ENABLED, | 271 GOOGLE_INSTANT_EXTENDED_ENABLED, |
269 GOOGLE_NTP_IS_THEMED, | 272 GOOGLE_NTP_IS_THEMED, |
270 GOOGLE_OMNIBOX_START_MARGIN, | 273 GOOGLE_OMNIBOX_START_MARGIN, |
271 GOOGLE_ORIGINAL_QUERY_FOR_SUGGESTION, | 274 GOOGLE_ORIGINAL_QUERY_FOR_SUGGESTION, |
272 GOOGLE_PAGE_CLASSIFICATION, | 275 GOOGLE_PAGE_CLASSIFICATION, |
273 GOOGLE_RLZ, | 276 GOOGLE_RLZ, |
274 GOOGLE_SEARCH_CLIENT, | 277 GOOGLE_SEARCH_CLIENT, |
275 GOOGLE_SEARCH_FIELDTRIAL_GROUP, | 278 GOOGLE_SEARCH_FIELDTRIAL_GROUP, |
| 279 GOOGLE_SESSION_TOKEN, |
276 GOOGLE_SUGGEST_CLIENT, | 280 GOOGLE_SUGGEST_CLIENT, |
277 GOOGLE_SUGGEST_REQUEST_ID, | 281 GOOGLE_SUGGEST_REQUEST_ID, |
278 GOOGLE_UNESCAPED_SEARCH_TERMS, | 282 GOOGLE_UNESCAPED_SEARCH_TERMS, |
279 LANGUAGE, | 283 LANGUAGE, |
280 SEARCH_TERMS, | 284 SEARCH_TERMS, |
281 }; | 285 }; |
282 | 286 |
283 // Used to identify an element of the raw url that can be replaced. | 287 // Used to identify an element of the raw url that can be replaced. |
284 struct Replacement { | 288 struct Replacement { |
285 Replacement(ReplacementType type, size_t index) | 289 Replacement(ReplacementType type, size_t index) |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 TemplateURLRef image_url_ref_; | 777 TemplateURLRef image_url_ref_; |
774 TemplateURLRef new_tab_url_ref_; | 778 TemplateURLRef new_tab_url_ref_; |
775 scoped_ptr<AssociatedExtensionInfo> extension_info_; | 779 scoped_ptr<AssociatedExtensionInfo> extension_info_; |
776 | 780 |
777 // TODO(sky): Add date last parsed OSD file. | 781 // TODO(sky): Add date last parsed OSD file. |
778 | 782 |
779 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 783 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
780 }; | 784 }; |
781 | 785 |
782 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 786 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |