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

Unified Diff: components/bookmarks/browser/titled_url_node_sorter.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/bookmark_model.cc ('k') | components/bookmarks/browser/typed_count_sorter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bookmarks/browser/titled_url_node_sorter.h
diff --git a/components/bookmarks/browser/titled_url_node_sorter.h b/components/bookmarks/browser/titled_url_node_sorter.h
new file mode 100644
index 0000000000000000000000000000000000000000..3327b5980c62167efb66683952d2bd5aca8826ae
--- /dev/null
+++ b/components/bookmarks/browser/titled_url_node_sorter.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_BOOKMARKS_BROWSER_TITLED_URL_NODE_SORTER_H_
+#define COMPONENTS_BOOKMARKS_BROWSER_TITLED_URL_NODE_SORTER_H_
+
+#include <set>
+#include <vector>
+
+namespace bookmarks {
+
+class TitledUrlNode;
+
+class TitledUrlNodeSorter {
+ public:
+ using TitledUrlNodes = std::vector<const TitledUrlNode*>;
+ using TitledUrlNodeSet = std::set<const TitledUrlNode*>;
+
+ virtual ~TitledUrlNodeSorter() {};
+
+ // Sorts |matches| in an implementation-specific way, placing the results in
+ // |sorted_nodes|.
+ virtual void SortMatches(const TitledUrlNodeSet& matches,
+ TitledUrlNodes* sorted_nodes) const = 0;
+};
+
+} // namespace bookmarks
+
+#endif // COMPONENTS_BOOKMARKS_BROWSER_TITLED_URL_NODE_SORTER_H_
« no previous file with comments | « components/bookmarks/browser/bookmark_model.cc ('k') | components/bookmarks/browser/typed_count_sorter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698