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 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 const GURL& gurl, | 133 const GURL& gurl, |
134 const std::string& languages, | 134 const std::string& languages, |
135 base::OffsetAdjuster::Adjustments* adjustments); | 135 base::OffsetAdjuster::Adjustments* adjustments); |
136 | 136 |
137 // Returns the lower-cased title, possibly truncated if the original title | 137 // Returns the lower-cased title, possibly truncated if the original title |
138 // is overly-long. | 138 // is overly-long. |
139 base::string16 CleanUpTitleForMatching(const base::string16& title); | 139 base::string16 CleanUpTitleForMatching(const base::string16& title); |
140 | 140 |
141 // Returns true if all the |nodes| can be edited by the user, | 141 // Returns true if all the |nodes| can be edited by the user, |
142 // as determined by BookmarkClient::CanBeEditedByUser(). | 142 // as determined by BookmarkClient::CanBeEditedByUser(). |
143 bool CanAllBeEditedByUser(bookmarks::BookmarkClient* client, | 143 bool CanAllBeEditedByUser(BookmarkClient* client, |
144 const std::vector<const BookmarkNode*>& nodes); | 144 const std::vector<const BookmarkNode*>& nodes); |
145 | 145 |
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 |