Chromium Code Reviews| Index: components/bookmarks/browser/bookmark_utils.h |
| diff --git a/components/bookmarks/browser/bookmark_utils.h b/components/bookmarks/browser/bookmark_utils.h |
| index c798e17d10e4f72f16d7bb0245fefa9c66c1feb4..30f542d58b94452a163bf88966341d58d284caae 100644 |
| --- a/components/bookmarks/browser/bookmark_utils.h |
| +++ b/components/bookmarks/browser/bookmark_utils.h |
| @@ -12,6 +12,7 @@ |
| #include "base/strings/utf_offset_string_conversions.h" |
| #include "components/bookmarks/browser/bookmark_node_data.h" |
| +class BookmarkClient; |
| class BookmarkModel; |
| class BookmarkNode; |
| class GURL; |
| @@ -60,11 +61,11 @@ void PasteFromClipboard(BookmarkModel* model, |
| int index); |
| // Returns true if the user can copy from the pasteboard. |
| -bool CanPasteFromClipboard(const BookmarkNode* node); |
| +bool CanPasteFromClipboard(BookmarkModel* model, const BookmarkNode* node); |
| // Returns a vector containing up to |max_count| of the most recently modified |
| -// folders. This never returns an empty vector. |
| -std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders( |
| +// user folders. This never returns an empty vector. |
| +std::vector<const BookmarkNode*> GetMostRecentlyModifiedUserFolders( |
| BookmarkModel* model, size_t max_count); |
| // Returns the most recently added bookmarks. This does not return folders, |
| @@ -101,7 +102,7 @@ const BookmarkNode* GetParentForNewNodes( |
| // Deletes the bookmark folders for the given list of |ids|. |
| void DeleteBookmarkFolders(BookmarkModel* model, const std::vector<int64>& ids); |
| -// If there are no bookmarks for url, a bookmark is created. |
| +// If there are no user bookmarks for url, a bookmark is created. |
| void AddIfNotBookmarked(BookmarkModel* model, |
| const GURL& url, |
| const base::string16& title); |
| @@ -136,6 +137,15 @@ base::string16 CleanUpUrlForMatching( |
| // is overly-long. |
| base::string16 CleanUpTitleForMatching(const base::string16& title); |
| +// Returns true all the nodes in the |list| can be edited by the user, as |
|
sky
2014/06/06 16:29:47
all -> id all
Joao da Silva
2014/06/06 17:46:40
Done.
|
| +// determined by BookmarkClient::CanBeEditedByUser. |
|
sky
2014/06/06 16:29:47
nit: use () when referring to function names in co
Joao da Silva
2014/06/06 17:46:40
Done.
|
| +bool CanAllBeEditedByUser(BookmarkClient* client, |
| + const std::vector<const BookmarkNode*>& list); |
|
sky
2014/06/06 16:29:47
nit: using the name list for vector is a bit odd.
Joao da Silva
2014/06/06 17:46:40
Done.
|
| + |
| +// Returns true if |url| has a bookmark in the |model| that can be edited |
| +// by the user. |
| +bool IsBookmarkedByUser(BookmarkModel* model, const GURL& url); |
| + |
| } // namespace bookmark_utils |
| // Returns the node with |id|, or NULL if there is no node with |id|. |