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

Unified Diff: components/bookmarks/browser/bookmark_match.h

Issue 2537223008: Add TitledUrlIndex for indexing arbitrary title/URL pairs (Closed)
Patch Set: const Created 4 years 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
Index: components/bookmarks/browser/bookmark_match.h
diff --git a/components/bookmarks/browser/bookmark_match.h b/components/bookmarks/browser/bookmark_match.h
index ce658939ca847345adc5ea6eb363870c24778087..76cb0bfae6b1a84b4f4d1588fc4dd460873b3cbf 100644
--- a/components/bookmarks/browser/bookmark_match.h
+++ b/components/bookmarks/browser/bookmark_match.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_
-#define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_
+#ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MATCH_H_
+#define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MATCH_H_
#include <stddef.h>
@@ -13,13 +13,13 @@
namespace bookmarks {
-class BookmarkNode;
+class TitledUrlNode;
struct BookmarkMatch {
// Each MatchPosition is the [begin, end) positions of a match within a
// string.
- typedef std::pair<size_t, size_t> MatchPosition;
- typedef std::vector<MatchPosition> MatchPositions;
+ using MatchPosition = std::pair<size_t, size_t>;
+ using MatchPositions = std::vector<MatchPosition>;
BookmarkMatch();
BookmarkMatch(const BookmarkMatch& other);
@@ -37,7 +37,7 @@ struct BookmarkMatch {
const std::vector<size_t>& offsets);
// The matching node of a query.
- const BookmarkNode* node;
+ const TitledUrlNode* node;
// Location of the matching words in the title of the node.
MatchPositions title_match_positions;
@@ -48,4 +48,4 @@ struct BookmarkMatch {
} // namespace bookmarks
-#endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_
+#endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MATCH_H_
« no previous file with comments | « components/bookmarks/browser/bookmark_index_unittest.cc ('k') | components/bookmarks/browser/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698