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

Side by Side Diff: components/bookmarks/browser/bookmark_match.h

Issue 865163003: bookmarks: Move BookmarkNode into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhanced_bookmarks fix Created 5 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_ 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_ 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 namespace bookmarks {
13
12 class BookmarkNode; 14 class BookmarkNode;
13 15
14 namespace bookmarks {
15
16 struct BookmarkMatch { 16 struct BookmarkMatch {
17 // Each MatchPosition is the [begin, end) positions of a match within a 17 // Each MatchPosition is the [begin, end) positions of a match within a
18 // string. 18 // string.
19 typedef std::pair<size_t, size_t> MatchPosition; 19 typedef std::pair<size_t, size_t> MatchPosition;
20 typedef std::vector<MatchPosition> MatchPositions; 20 typedef std::vector<MatchPosition> MatchPositions;
21 21
22 BookmarkMatch(); 22 BookmarkMatch();
23 ~BookmarkMatch(); 23 ~BookmarkMatch();
24 24
25 // Extracts and returns the offsets from |match_positions|. 25 // Extracts and returns the offsets from |match_positions|.
(...skipping 13 matching lines...) Expand all
39 // Location of the matching words in the title of the node. 39 // Location of the matching words in the title of the node.
40 MatchPositions title_match_positions; 40 MatchPositions title_match_positions;
41 41
42 // Location of the matching words in the URL of the node. 42 // Location of the matching words in the URL of the node.
43 MatchPositions url_match_positions; 43 MatchPositions url_match_positions;
44 }; 44 };
45 45
46 } // namespace bookmarks 46 } // namespace bookmarks
47 47
48 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_ 48 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_TITLE_MATCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698