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, this may be more efficient (see |
20 // implementation for details) than the default code path. | 20 // implementation for details) than the default code path. |
| 21 // input.text() must not be empty. |
21 AutocompleteMatch VerbatimMatchForURL( | 22 AutocompleteMatch VerbatimMatchForURL( |
22 AutocompleteProviderClient* client, | 23 AutocompleteProviderClient* client, |
23 const AutocompleteInput& input, | 24 const AutocompleteInput& input, |
24 const GURL& destination_url, | 25 const GURL& destination_url, |
25 HistoryURLProvider* history_url_provider, | 26 HistoryURLProvider* history_url_provider, |
26 int verbatim_relevance); | 27 int verbatim_relevance); |
27 | 28 |
28 #endif // COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ | 29 #endif // COMPONENTS_OMNIBOX_BROWSER_VERBATIM_MATCH_H_ |
OLD | NEW |