Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Side by Side Diff: components/omnibox/browser/verbatim_match.h

Issue 2124563002: Don't try to create a verbatim match with an empty input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698