Index: chrome/browser/autocomplete/bookmark_provider.h |
diff --git a/chrome/browser/autocomplete/bookmark_provider.h b/chrome/browser/autocomplete/bookmark_provider.h |
index 5ddfaa385391dff1f18bce2cbb1b1c1dfd79727c..96efdabd9b7cf47a52d08db87f5054120606f251 100644 |
--- a/chrome/browser/autocomplete/bookmark_provider.h |
+++ b/chrome/browser/autocomplete/bookmark_provider.h |
@@ -13,7 +13,7 @@ |
#include "chrome/browser/history/snippet.h" |
class BookmarkModel; |
-struct BookmarkTitleMatch; |
+struct BookmarkMatch; |
class Profile; |
// This class is an autocomplete provider which quickly (and synchronously) |
@@ -49,15 +49,16 @@ class BookmarkProvider : public AutocompleteProvider { |
// otherwise suggest the top |kMaxMatches| matches. |
void DoAutocomplete(const AutocompleteInput& input, bool best_match); |
- // Compose an AutocompleteMatch based on |title_match| that has 1) the URL of |
+ // Compose an AutocompleteMatch based on |match| that has 1) the URL of |
// title_match's bookmark, and 2) the bookmark's title, not the URL's page |
Peter Kasting
2014/04/16 23:44:25
Nit: This still refers to |title_match|
Mark P
2014/04/17 20:24:18
Done.
|
// title, as the description. |input| is used to compute the match's |
// inline_autocompletion. |fixed_up_input| is used in that way as well; |
// it's passed separately so this function doesn't have to compute it. |
- AutocompleteMatch TitleMatchToACMatch( |
+ // title, as the description. |
Peter Kasting
2014/04/16 23:44:25
Nit: Uh... broken edit?
Mark P
2014/04/17 20:24:18
Yup, bad rebase/resolve.
Fixed.
|
+ AutocompleteMatch BookmarkMatchToACMatch( |
const AutocompleteInput& input, |
const AutocompleteInput& fixed_up_input, |
- const BookmarkTitleMatch& title_match); |
+ const BookmarkMatch& match); |
// Converts |positions| into ACMatchClassifications and returns the |
// classifications. |text_length| is used to determine the need to add an |
@@ -65,10 +66,14 @@ class BookmarkProvider : public AutocompleteProvider { |
// properly highlighted. |
static ACMatchClassifications ClassificationsFromMatch( |
const Snippet::MatchPositions& positions, |
- size_t text_length); |
+ size_t text_length, |
+ bool is_url); |
BookmarkModel* bookmark_model_; |
+ // True if we should use matches in the URL for scoring. |
+ const bool score_using_url_matches_; |
+ |
// Languages used during the URL formatting. |
std::string languages_; |