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

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

Issue 2537223008: Add TitledUrlIndex for indexing arbitrary title/URL pairs (Closed)
Patch Set: refactor in-place to preserve history 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/titled_url_node.h
diff --git a/components/bookmarks/browser/titled_url_node.h b/components/bookmarks/browser/titled_url_node.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbd6759b77089c1fa1b89469c2852191e7798384
--- /dev/null
+++ b/components/bookmarks/browser/titled_url_node.h
@@ -0,0 +1,29 @@
+// 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_H_
+#define COMPONENTS_BOOKMARKS_BROWSER_TITLED_URL_NODE_H_
+
+#include "url/gurl.h"
+
+namespace bookmarks {
+
+// TitledUrlNode is an interface for objects like bookmarks that expose a title
+// and URL. TitledUrlNodes can be added to a BookmarkIndex to quickly retrieve
+// all nodes that contain a particular word in their title or URL.
+class TitledUrlNode {
+ public:
+ // Returns the title for the node.
+ virtual const base::string16& GetTitledUrlNodeTitle() const = 0;
+
+ // Returns the URL for the node.
+ virtual const GURL& GetTitledUrlNodeUrl() const = 0;
+
+ protected:
+ virtual ~TitledUrlNode() {}
+};
+
+} // namespace bookmarks
+
+#endif // COMPONENTS_BOOKMARKS_BROWSER_TITLED_URL_NODE_H_

Powered by Google App Engine
This is Rietveld 408576698