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

Unified Diff: components/bookmarks/browser/bookmark_model.h

Issue 302313005: Show the Managed Bookmarks folder in the views UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased on model changes Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/bookmarks/browser/bookmark_model.h
diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h
index ab8ee5a8ed2f974b50f0b20532771b3c0d9e3734..5362d316d591ecd23d34368b06011b3d3bf7132c 100644
--- a/components/bookmarks/browser/bookmark_model.h
+++ b/components/bookmarks/browser/bookmark_model.h
@@ -162,9 +162,10 @@ class BookmarkModel : public BookmarkService {
// Returns the set of nodes with the |url|.
void GetNodesByURL(const GURL& url, std::vector<const BookmarkNode*>* nodes);
- // Returns the most recently added node for the |url|. Returns NULL if |url|
- // is not bookmarked.
- const BookmarkNode* GetMostRecentlyAddedNodeForURL(const GURL& url);
+ // Returns the most recently added user node for the |url|; urls from any
+ // nodes that are not editable by the user are never returned by this call.
+ // Returns NULL if |url| is not bookmarked.
+ const BookmarkNode* GetMostRecentlyAddedUserNodeForURL(const GURL& url);
// Returns true if there are bookmarks, otherwise returns false.
// This method is thread safe.
@@ -175,6 +176,10 @@ class BookmarkModel : public BookmarkService {
// See BookmarkService for more details on this.
virtual bool IsBookmarked(const GURL& url) OVERRIDE;
+ // Same as IsBookmarked() but only returns true if at least one of the
+ // bookmarks found can be edited by the user.
+ bool IsBookmarkedByUser(const GURL& url);
sky 2014/06/05 23:46:47 Move this to bookmark_utils.
Joao da Silva 2014/06/06 15:41:03 Done.
+
// Returns all the bookmarked urls and their titles.
// This method is thread safe.
// See BookmarkService for more details on this.
@@ -296,8 +301,9 @@ class BookmarkModel : public BookmarkService {
};
// Implementation of IsBookmarked. Before calling this the caller must obtain
- // a lock on |url_lock_|.
- bool IsBookmarkedNoLock(const GURL& url);
+ // a lock on |url_lock_|. If |only_by_editable_nodes| is true then bookmarks
+ // that the user can't edit are skipped while searching for |url|.
+ bool IsBookmarkedNoLock(const GURL& url, bool only_by_editable_nodes);
// Removes the node from internal maps and recurses through all children. If
// the node is a url, its url is added to removed_urls.

Powered by Google App Engine
This is Rietveld 408576698