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

Unified Diff: chrome/browser/autocomplete/bookmark_provider.h

Issue 184663002: Omnibox: Make URLs of Bookmarks Searchable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ALL_MATCHES (in response to recent changes) Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/bookmark_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/bookmark_provider.h
diff --git a/chrome/browser/autocomplete/bookmark_provider.h b/chrome/browser/autocomplete/bookmark_provider.h
index 8bdf2e93de7716dddc955b9701372142dfd6d442..be256e90dd9b63d74980fb9724dec4614d22dccd 100644
--- a/chrome/browser/autocomplete/bookmark_provider.h
+++ b/chrome/browser/autocomplete/bookmark_provider.h
@@ -13,7 +13,7 @@
#include "components/query_parser/snippet.h"
class BookmarkModel;
-struct BookmarkTitleMatch;
+struct BookmarkMatch;
class Profile;
// This class is an autocomplete provider which quickly (and synchronously)
@@ -48,15 +48,15 @@ class BookmarkProvider : public AutocompleteProvider {
// |matches_|.
void DoAutocomplete(const AutocompleteInput& input);
- // Compose an AutocompleteMatch based on |title_match| that has 1) the URL of
- // title_match's bookmark, and 2) the bookmark's title, not the URL's page
+ // Compose an AutocompleteMatch based on |match| that has 1) the URL of
+ // |match|'s bookmark, and 2) the bookmark's title, not the URL's page
// 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(
+ 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
@@ -64,10 +64,14 @@ class BookmarkProvider : public AutocompleteProvider {
// properly highlighted.
static ACMatchClassifications ClassificationsFromMatch(
const query_parser::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_;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/bookmark_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698