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

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

Issue 2559633003: Factor out bookmark-specific sorting logic from BookmarkIndex (Closed)
Patch Set: comments, virtual destructor, explicit 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
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | components/bookmarks/browser/bookmark_index.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bookmarks/browser/bookmark_index.h
diff --git a/components/bookmarks/browser/bookmark_index.h b/components/bookmarks/browser/bookmark_index.h
index c6fd22ba72fc52c0a9554510144caab2affeeec5..52a510d4dbdf68001be0d3be93c5364f97bf72e2 100644
--- a/components/bookmarks/browser/bookmark_index.h
+++ b/components/bookmarks/browser/bookmark_index.h
@@ -18,8 +18,8 @@
namespace bookmarks {
-class BookmarkClient;
class TitledUrlNode;
+class TitledUrlNodeSorter;
struct BookmarkMatch;
// BookmarkIndex maintains an index of the titles and URLs of bookmarks for
@@ -31,7 +31,7 @@ struct BookmarkMatch;
// TitledUrlNodes that contain that string in their title or URL.
class BookmarkIndex {
public:
- BookmarkIndex(BookmarkClient* client);
+ BookmarkIndex(std::unique_ptr<TitledUrlNodeSorter> sorter);
~BookmarkIndex();
// Invoked when a title/URL pair has been added to the model.
@@ -84,7 +84,7 @@ class BookmarkIndex {
Index index_;
- BookmarkClient* const client_;
+ std::unique_ptr<TitledUrlNodeSorter> sorter_;
DISALLOW_COPY_AND_ASSIGN(BookmarkIndex);
};
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | components/bookmarks/browser/bookmark_index.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698