OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "components/omnibox/browser/autocomplete_input.h" | 9 #include "components/omnibox/browser/autocomplete_input.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 struct AutocompleteMatch; | 12 struct AutocompleteMatch; |
13 class AutocompleteProviderClient; | 13 class AutocompleteProviderClient; |
14 class HistoryURLProvider; | 14 class HistoryURLProvider; |
15 | 15 |
16 // Returns a verbatim match for input.text() with a relevance of | 16 // Returns a verbatim match for input.text() with a relevance of |
17 // |verbatim_relevance|. If |verbatim_relevance| is negative then a default | 17 // |verbatim_relevance|. If |verbatim_relevance| is negative then a default |
18 // value is used. If the desired |destination_url| is already known and a | 18 // value is used. If the desired |destination_url| is already known and a |
19 // |history_url_provider| is also provided, this may be more efficient (see | 19 // |history_url_provider| is also provided, use |destination_description| as the |
| 20 // description. Providing |history_url_provider| also may be more efficient (see |
20 // implementation for details) than the default code path. | 21 // implementation for details) than the default code path. |
21 // input.text() must not be empty. | 22 // input.text() must not be empty. |
22 AutocompleteMatch VerbatimMatchForURL( | 23 AutocompleteMatch VerbatimMatchForURL( |
23 AutocompleteProviderClient* client, | 24 AutocompleteProviderClient* client, |
24 const AutocompleteInput& input, | 25 const AutocompleteInput& input, |
25 const GURL& destination_url, | 26 const GURL& destination_url, |
| 27 const base::string16& destination_description, |
26 HistoryURLProvider* history_url_provider, | 28 HistoryURLProvider* history_url_provider, |
27 int verbatim_relevance); | 29 int verbatim_relevance); |
28 | 30 |
29 #endif // COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ | 31 #endif // COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ |
OLD | NEW |