summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_title_match.h
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 15:39:57 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-30 15:39:57 +0000
commitdcf5fbb73e68623808da498e44c14224050a88c4 (patch)
tree4a5c9ee2de6f364d11533dfdd01e33d60d227060 /chrome/browser/bookmarks/bookmark_title_match.h
parent9c50d97c9729f3376e352f2b539dccb66c1e66e1 (diff)
downloadchromium_src-dcf5fbb73e68623808da498e44c14224050a88c4.zip
chromium_src-dcf5fbb73e68623808da498e44c14224050a88c4.tar.gz
chromium_src-dcf5fbb73e68623808da498e44c14224050a88c4.tar.bz2
bookmarks: Get rid of the dependency on c/b/history/snippet.h
In order to do this we move Snippet Match definitions into BookmarkTitleMatch. BUG=144783 R=sky@chromium.org Review URL: https://codereview.chromium.org/15963014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_title_match.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_title_match.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_title_match.h b/chrome/browser/bookmarks/bookmark_title_match.h
new file mode 100644
index 0000000..334c66e
--- /dev/null
+++ b/chrome/browser/bookmarks/bookmark_title_match.h
@@ -0,0 +1,31 @@
+// Copyright 2013 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 CHROME_BROWSER_BOOKMARKS_BOOKMARK_TITLE_MATCH_H_
+#define CHROME_BROWSER_BOOKMARKS_BOOKMARK_TITLE_MATCH_H_
+
+#include <stddef.h>
+
+#include <utility>
+#include <vector>
+
+class BookmarkNode;
+
+struct BookmarkTitleMatch {
+ // 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;
+
+ BookmarkTitleMatch();
+ ~BookmarkTitleMatch();
+
+ // The matching node of a query.
+ const BookmarkNode* node;
+
+ // Location of the matching words in the title of the node.
+ MatchPositions match_positions;
+};
+
+#endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_TITLE_MATCH_H_