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

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

Issue 2583763003: Factor out AutocompleteMatch creation from BookmarkProvider (Closed)
Patch Set: changes for mpearson@ Created 3 years, 11 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OMNIBOX_BROWSER_TITLED_URL_MATCH_UTILS_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_TITLED_URL_MATCH_UTILS_H_
7
8 #include "base/strings/string16.h"
9 #include "components/bookmarks/browser/titled_url_match.h"
10 #include "components/omnibox/browser/autocomplete_match_type.h"
11
12 class AutocompleteInput;
13 class AutocompleteProvider;
14 class AutocompleteSchemeClassifier;
15 struct AutocompleteMatch;
16
17 namespace bookmarks {
18
19 // Compose an AutocompleteMatch based on |match| that has the match's URL and
20 // page title, type |type|, and relevance score |relevance|. |input| is used to
21 // compute the match's inline_autocompletion. |fixed_up_input_text| is used in
22 // that way as well; it's passed separately so this function doesn't have to
23 // compute it.
24 AutocompleteMatch TitledUrlMatchToAutocompleteMatch(
25 const bookmarks::TitledUrlMatch& match,
26 AutocompleteMatchType::Type type,
27 int relevance,
28 AutocompleteProvider* provider,
29 const AutocompleteSchemeClassifier& scheme_classifier,
30 const AutocompleteInput& input,
31 const base::string16& fixed_up_input_text);
32
33 } // namespace bookmarks
34
35 #endif // COMPONENTS_OMNIBOX_BROWSER_TITLED_URL_MATCH_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698