| 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_UTILS_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/strings/utf_offset_string_conversions.h" | 12 #include "base/strings/utf_offset_string_conversions.h" |
| 13 #include "components/bookmarks/browser/bookmark_node_data.h" | 13 #include "components/bookmarks/browser/bookmark_node_data.h" |
| 14 | 14 |
| 15 class BookmarkNode; | |
| 16 class GURL; | 15 class GURL; |
| 17 | 16 |
| 18 namespace user_prefs { | 17 namespace user_prefs { |
| 19 class PrefRegistrySyncable; | 18 class PrefRegistrySyncable; |
| 20 } | 19 } |
| 21 | 20 |
| 22 // A collection of bookmark utility functions used by various parts of the UI | 21 // A collection of bookmark utility functions used by various parts of the UI |
| 23 // that show bookmarks (bookmark manager, bookmark bar view, ...) and other | 22 // that show bookmarks (bookmark manager, bookmark bar view, ...) and other |
| 24 // systems that involve indexing and searching bookmarks. | 23 // systems that involve indexing and searching bookmarks. |
| 25 namespace bookmarks { | 24 namespace bookmarks { |
| 26 | 25 |
| 27 class BookmarkClient; | 26 class BookmarkClient; |
| 28 class BookmarkModel; | 27 class BookmarkModel; |
| 28 class BookmarkNode; |
| 29 | 29 |
| 30 // Fields to use when finding matching bookmarks. | 30 // Fields to use when finding matching bookmarks. |
| 31 struct QueryFields { | 31 struct QueryFields { |
| 32 QueryFields(); | 32 QueryFields(); |
| 33 ~QueryFields(); | 33 ~QueryFields(); |
| 34 | 34 |
| 35 scoped_ptr<base::string16> word_phrase_query; | 35 scoped_ptr<base::string16> word_phrase_query; |
| 36 scoped_ptr<base::string16> url; | 36 scoped_ptr<base::string16> url; |
| 37 scoped_ptr<base::string16> title; | 37 scoped_ptr<base::string16> title; |
| 38 }; | 38 }; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Returns true if |url| has a bookmark in the |model| that can be edited | 146 // Returns true if |url| has a bookmark in the |model| that can be edited |
| 147 // by the user. | 147 // by the user. |
| 148 bool IsBookmarkedByUser(BookmarkModel* model, const GURL& url); | 148 bool IsBookmarkedByUser(BookmarkModel* model, const GURL& url); |
| 149 | 149 |
| 150 // Returns the node with |id|, or NULL if there is no node with |id|. | 150 // Returns the node with |id|, or NULL if there is no node with |id|. |
| 151 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id); | 151 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id); |
| 152 | 152 |
| 153 } // namespace bookmarks | 153 } // namespace bookmarks |
| 154 | 154 |
| 155 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ | 155 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_UTILS_H_ |
| OLD | NEW |