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_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // default match. Providers should set this to true only if the | 264 // default match. Providers should set this to true only if the |
265 // user's input, plus any inline autocompletion on this match, would | 265 // user's input, plus any inline autocompletion on this match, would |
266 // lead the user to expect a navigation to this match's destination. | 266 // lead the user to expect a navigation to this match's destination. |
267 // For example, with input "foo", a search for "bar" or navigation | 267 // For example, with input "foo", a search for "bar" or navigation |
268 // to "bar.com" should not set this flag; a navigation to "foo.com" | 268 // to "bar.com" should not set this flag; a navigation to "foo.com" |
269 // should only set this flag if ".com" will be inline autocompleted; | 269 // should only set this flag if ".com" will be inline autocompleted; |
270 // and a navigation to "foo/" (an intranet host) or search for "foo" | 270 // and a navigation to "foo/" (an intranet host) or search for "foo" |
271 // should set this flag. | 271 // should set this flag. |
272 bool allowed_to_be_default_match; | 272 bool allowed_to_be_default_match; |
273 | 273 |
| 274 // If the match should be allowed to be demoted by OmniboxBundleV1 ranking |
| 275 // experiments. |
| 276 bool demoteable; |
| 277 |
274 // The URL to actually load when the autocomplete item is selected. This URL | 278 // The URL to actually load when the autocomplete item is selected. This URL |
275 // should be canonical so we can compare URLs with strcmp to avoid dupes. | 279 // should be canonical so we can compare URLs with strcmp to avoid dupes. |
276 // It may be empty if there is no possible navigation. | 280 // It may be empty if there is no possible navigation. |
277 GURL destination_url; | 281 GURL destination_url; |
278 | 282 |
279 // The destination URL with "www." stripped off for better dupe finding. | 283 // The destination URL with "www." stripped off for better dupe finding. |
280 GURL stripped_destination_url; | 284 GURL stripped_destination_url; |
281 | 285 |
282 // The main text displayed in the address bar dropdown. | 286 // The main text displayed in the address bar dropdown. |
283 string16 contents; | 287 string16 contents; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 const string16& text, | 349 const string16& text, |
346 const ACMatchClassifications& classifications) const; | 350 const ACMatchClassifications& classifications) const; |
347 #endif | 351 #endif |
348 }; | 352 }; |
349 | 353 |
350 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; | 354 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; |
351 typedef std::vector<ACMatchClassification> ACMatchClassifications; | 355 typedef std::vector<ACMatchClassification> ACMatchClassifications; |
352 typedef std::vector<AutocompleteMatch> ACMatches; | 356 typedef std::vector<AutocompleteMatch> ACMatches; |
353 | 357 |
354 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ | 358 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
OLD | NEW |