| OLD | NEW |
| 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_INDEX_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "components/query_parser/query_parser.h" | 15 #include "components/query_parser/query_parser.h" |
| 16 | 16 |
| 17 class BookmarkClient; | 17 class BookmarkClient; |
| 18 class BookmarkNode; | 18 class BookmarkNode; |
| 19 struct BookmarkMatch; | |
| 20 | 19 |
| 21 namespace bookmarks { | 20 namespace bookmarks { |
| 22 | 21 |
| 22 struct BookmarkMatch; |
| 23 |
| 23 // BookmarkIndex maintains an index of the titles and URLs of bookmarks for | 24 // BookmarkIndex maintains an index of the titles and URLs of bookmarks for |
| 24 // quick look up. BookmarkIndex is owned and maintained by BookmarkModel, you | 25 // quick look up. BookmarkIndex is owned and maintained by BookmarkModel, you |
| 25 // shouldn't need to interact directly with BookmarkIndex. | 26 // shouldn't need to interact directly with BookmarkIndex. |
| 26 // | 27 // |
| 27 // BookmarkIndex maintains the index (index_) as a map of sets. The map (type | 28 // BookmarkIndex maintains the index (index_) as a map of sets. The map (type |
| 28 // Index) maps from a lower case string to the set (type NodeSet) of | 29 // Index) maps from a lower case string to the set (type NodeSet) of |
| 29 // BookmarkNodes that contain that string in their title or URL. | 30 // BookmarkNodes that contain that string in their title or URL. |
| 30 class BookmarkIndex { | 31 class BookmarkIndex { |
| 31 public: | 32 public: |
| 32 // |index_urls| says whether URLs should be stored in the index in addition | 33 // |index_urls| says whether URLs should be stored in the index in addition |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 116 |
| 116 // True if URLs are stored in the index as well as bookmark titles. | 117 // True if URLs are stored in the index as well as bookmark titles. |
| 117 const bool index_urls_; | 118 const bool index_urls_; |
| 118 | 119 |
| 119 DISALLOW_COPY_AND_ASSIGN(BookmarkIndex); | 120 DISALLOW_COPY_AND_ASSIGN(BookmarkIndex); |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 } // namespace bookmarks | 123 } // namespace bookmarks |
| 123 | 124 |
| 124 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_ | 125 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_ |
| OLD | NEW |