Chromium Code Reviews| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 // The optional assisted query stats, aka AQS, used for logging purposes. | 63 // The optional assisted query stats, aka AQS, used for logging purposes. |
| 64 // This string contains impressions of all autocomplete matches shown | 64 // This string contains impressions of all autocomplete matches shown |
| 65 // at the query submission time. For privacy reasons, we require the | 65 // at the query submission time. For privacy reasons, we require the |
| 66 // search provider to support HTTPS protocol in order to receive the AQS | 66 // search provider to support HTTPS protocol in order to receive the AQS |
| 67 // param. | 67 // param. |
| 68 // For more details, see http://goto.google.com/binary-clients-logging . | 68 // For more details, see http://goto.google.com/binary-clients-logging . |
| 69 std::string assisted_query_stats; | 69 std::string assisted_query_stats; |
| 70 | 70 |
| 71 // TODO: Remove along with "aq" CGI param. | 71 // TODO: Remove along with "aq" CGI param. |
| 72 int accepted_suggestion; | 72 int accepted_suggestion; |
| 73 | |
| 74 // The 0-based position of the cursor within the query string at the time | |
| 75 // the request was issued. Set to string16::npos if not used or after the | |
| 76 // last character. | |
|
Peter Kasting
2012/12/18 03:01:01
I thought "after the last character" was allowed n
Bart N.
2012/12/18 23:47:39
You mean "wasn't", right? I forgot to fix it here.
| |
| 77 size_t cursor_position; | |
| 73 }; | 78 }; |
| 74 | 79 |
| 75 TemplateURLRef(TemplateURL* owner, Type type); | 80 TemplateURLRef(TemplateURL* owner, Type type); |
| 76 TemplateURLRef(TemplateURL* owner, size_t index_in_owner); | 81 TemplateURLRef(TemplateURL* owner, size_t index_in_owner); |
| 77 ~TemplateURLRef(); | 82 ~TemplateURLRef(); |
| 78 | 83 |
| 79 // Returns the raw URL. None of the parameters will have been replaced. | 84 // Returns the raw URL. None of the parameters will have been replaced. |
| 80 std::string GetURL() const; | 85 std::string GetURL() const; |
| 81 | 86 |
| 82 // Returns true if this URL supports replacement. | 87 // Returns true if this URL supports replacement. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLTwoParameters); | 155 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLTwoParameters); |
| 151 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNestedParameter); | 156 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNestedParameter); |
| 152 | 157 |
| 153 // Enumeration of the known types. | 158 // Enumeration of the known types. |
| 154 enum ReplacementType { | 159 enum ReplacementType { |
| 155 ENCODING, | 160 ENCODING, |
| 156 GOOGLE_ACCEPTED_SUGGESTION, | 161 GOOGLE_ACCEPTED_SUGGESTION, |
| 157 GOOGLE_ASSISTED_QUERY_STATS, | 162 GOOGLE_ASSISTED_QUERY_STATS, |
| 158 GOOGLE_BASE_URL, | 163 GOOGLE_BASE_URL, |
| 159 GOOGLE_BASE_SUGGEST_URL, | 164 GOOGLE_BASE_SUGGEST_URL, |
| 165 GOOGLE_CURSOR_POSITION, | |
| 160 GOOGLE_INSTANT_ENABLED, | 166 GOOGLE_INSTANT_ENABLED, |
| 161 GOOGLE_INSTANT_EXTENDED_ENABLED, | 167 GOOGLE_INSTANT_EXTENDED_ENABLED, |
| 162 GOOGLE_ORIGINAL_QUERY_FOR_SUGGESTION, | 168 GOOGLE_ORIGINAL_QUERY_FOR_SUGGESTION, |
| 163 GOOGLE_RLZ, | 169 GOOGLE_RLZ, |
| 164 GOOGLE_SEARCH_CLIENT, | 170 GOOGLE_SEARCH_CLIENT, |
| 165 GOOGLE_SEARCH_FIELDTRIAL_GROUP, | 171 GOOGLE_SEARCH_FIELDTRIAL_GROUP, |
| 166 GOOGLE_UNESCAPED_SEARCH_TERMS, | 172 GOOGLE_UNESCAPED_SEARCH_TERMS, |
| 167 LANGUAGE, | 173 LANGUAGE, |
| 168 SEARCH_TERMS, | 174 SEARCH_TERMS, |
| 169 }; | 175 }; |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 489 TemplateURLRef url_ref_; | 495 TemplateURLRef url_ref_; |
| 490 TemplateURLRef suggestions_url_ref_; | 496 TemplateURLRef suggestions_url_ref_; |
| 491 TemplateURLRef instant_url_ref_; | 497 TemplateURLRef instant_url_ref_; |
| 492 | 498 |
| 493 // TODO(sky): Add date last parsed OSD file. | 499 // TODO(sky): Add date last parsed OSD file. |
| 494 | 500 |
| 495 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 501 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
| 496 }; | 502 }; |
| 497 | 503 |
| 498 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 504 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
| OLD | NEW |