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> |
11 | 11 |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/autocomplete/autocomplete_input.h" | 15 #include "components/metrics/proto/omnibox_event.pb.h" |
| 16 #include "components/metrics/proto/omnibox_input_type.pb.h" |
16 #include "components/search_engines/template_url_data.h" | 17 #include "components/search_engines/template_url_data.h" |
17 #include "components/search_engines/template_url_id.h" | 18 #include "components/search_engines/template_url_id.h" |
18 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
20 #include "url/url_parse.h" | 21 #include "url/url_parse.h" |
21 | 22 |
22 class SearchTermsData; | 23 class SearchTermsData; |
23 class TemplateURL; | 24 class TemplateURL; |
24 | 25 |
25 | 26 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 std::string encoding; | 105 std::string encoding; |
105 }; | 106 }; |
106 | 107 |
107 // The search terms (query). | 108 // The search terms (query). |
108 base::string16 search_terms; | 109 base::string16 search_terms; |
109 | 110 |
110 // The original (input) query. | 111 // The original (input) query. |
111 base::string16 original_query; | 112 base::string16 original_query; |
112 | 113 |
113 // The type the original input query was identified as. | 114 // The type the original input query was identified as. |
114 AutocompleteInput::Type input_type; | 115 metrics::OmniboxInputType::Type input_type; |
115 | 116 |
116 // The optional assisted query stats, aka AQS, used for logging purposes. | 117 // The optional assisted query stats, aka AQS, used for logging purposes. |
117 // This string contains impressions of all autocomplete matches shown | 118 // This string contains impressions of all autocomplete matches shown |
118 // at the query submission time. For privacy reasons, we require the | 119 // at the query submission time. For privacy reasons, we require the |
119 // search provider to support HTTPS protocol in order to receive the AQS | 120 // search provider to support HTTPS protocol in order to receive the AQS |
120 // param. | 121 // param. |
121 // For more details, see http://goto.google.com/binary-clients-logging . | 122 // For more details, see http://goto.google.com/binary-clients-logging . |
122 std::string assisted_query_stats; | 123 std::string assisted_query_stats; |
123 | 124 |
124 // TODO: Remove along with "aq" CGI param. | 125 // TODO: Remove along with "aq" CGI param. |
125 int accepted_suggestion; | 126 int accepted_suggestion; |
126 | 127 |
127 // The 0-based position of the cursor within the query string at the time | 128 // The 0-based position of the cursor within the query string at the time |
128 // the request was issued. Set to base::string16::npos if not used. | 129 // the request was issued. Set to base::string16::npos if not used. |
129 size_t cursor_position; | 130 size_t cursor_position; |
130 | 131 |
131 // The start-edge margin of the omnibox in pixels, used in extended Instant | 132 // The start-edge margin of the omnibox in pixels, used in extended Instant |
132 // to align the preview contents with the omnibox. | 133 // to align the preview contents with the omnibox. |
133 int omnibox_start_margin; | 134 int omnibox_start_margin; |
134 | 135 |
135 // The URL of the current webpage to be used for experimental zero-prefix | 136 // The URL of the current webpage to be used for experimental zero-prefix |
136 // suggestions. | 137 // suggestions. |
137 std::string current_page_url; | 138 std::string current_page_url; |
138 | 139 |
139 // Which omnibox the user used to type the prefix. | 140 // Which omnibox the user used to type the prefix. |
140 AutocompleteInput::PageClassification page_classification; | 141 metrics::OmniboxEventProto::PageClassification page_classification; |
141 | 142 |
142 // True for searches issued with the bookmark bar pref set to shown. | 143 // True for searches issued with the bookmark bar pref set to shown. |
143 bool bookmark_bar_pinned; | 144 bool bookmark_bar_pinned; |
144 | 145 |
145 // Optional session token. | 146 // Optional session token. |
146 std::string session_token; | 147 std::string session_token; |
147 | 148 |
148 // Additional query params provided by the suggest server. | 149 // Additional query params provided by the suggest server. |
149 std::string suggest_query_params; | 150 std::string suggest_query_params; |
150 | 151 |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 TemplateURLRef new_tab_url_ref_; | 685 TemplateURLRef new_tab_url_ref_; |
685 TemplateURLRef contextual_search_url_ref_; | 686 TemplateURLRef contextual_search_url_ref_; |
686 scoped_ptr<AssociatedExtensionInfo> extension_info_; | 687 scoped_ptr<AssociatedExtensionInfo> extension_info_; |
687 | 688 |
688 // TODO(sky): Add date last parsed OSD file. | 689 // TODO(sky): Add date last parsed OSD file. |
689 | 690 |
690 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 691 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
691 }; | 692 }; |
692 | 693 |
693 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 694 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |