diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 00:46:24 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 00:46:24 +0000 |
commit | cf8e817e64b3d5a730bb1d706adb801b2d2b5ef8 (patch) | |
tree | 1e62fa795f1e9714d73316e9c9e314d53362ca1d /chrome/browser/bookmarks | |
parent | 1eabfd7a4dd99d9d3eec4e8b2fa0032d00a31093 (diff) | |
download | chromium_src-cf8e817e64b3d5a730bb1d706adb801b2d2b5ef8.zip chromium_src-cf8e817e64b3d5a730bb1d706adb801b2d2b5ef8.tar.gz chromium_src-cf8e817e64b3d5a730bb1d706adb801b2d2b5ef8.tar.bz2 |
bookmarks: Add missing OVERRIDE annotations to virtual method implementations.
While I'm here reorder the methods in both header and source file to make it
easier to find them.
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7461034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93745 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model.cc | 24 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model.h | 28 |
2 files changed, 28 insertions, 24 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc index 1ff426d..09d0b4e 100644 --- a/chrome/browser/bookmarks/bookmark_model.cc +++ b/chrome/browser/bookmarks/bookmark_model.cc @@ -365,6 +365,16 @@ const BookmarkNode* BookmarkModel::GetMostRecentlyAddedNodeForURL( return nodes.front(); } +bool BookmarkModel::HasBookmarks() { + base::AutoLock url_lock(url_lock_); + return !nodes_ordered_by_url_set_.empty(); +} + +bool BookmarkModel::IsBookmarked(const GURL& url) { + base::AutoLock url_lock(url_lock_); + return IsBookmarkedNoLock(url); +} + void BookmarkModel::GetBookmarks(std::vector<GURL>* urls) { base::AutoLock url_lock(url_lock_); const GURL* last_url = NULL; @@ -378,14 +388,8 @@ void BookmarkModel::GetBookmarks(std::vector<GURL>* urls) { } } -bool BookmarkModel::HasBookmarks() { - base::AutoLock url_lock(url_lock_); - return !nodes_ordered_by_url_set_.empty(); -} - -bool BookmarkModel::IsBookmarked(const GURL& url) { - base::AutoLock url_lock(url_lock_); - return IsBookmarkedNoLock(url); +void BookmarkModel::BlockTillLoaded() { + loaded_signal_.Wait(); } const BookmarkNode* BookmarkModel::GetNodeByID(int64 id) { @@ -690,10 +694,6 @@ BookmarkNode* BookmarkModel::AddNode(BookmarkNode* parent, return node; } -void BookmarkModel::BlockTillLoaded() { - loaded_signal_.Wait(); -} - const BookmarkNode* BookmarkModel::GetNodeByID(const BookmarkNode* node, int64 id) { if (node->id() == id) diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h index 4710694..6985f10 100644 --- a/chrome/browser/bookmarks/bookmark_model.h +++ b/chrome/browser/bookmarks/bookmark_model.h @@ -10,6 +10,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/observer_list.h" #include "base/string16.h" #include "base/synchronization/lock.h" @@ -237,20 +238,23 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { // not bookmarked. const BookmarkNode* GetMostRecentlyAddedNodeForURL(const GURL& url); - // Returns all the bookmarked urls. This method is thread safe. - virtual void GetBookmarks(std::vector<GURL>* urls); - - // Returns true if there are bookmarks, otherwise returns false. This method - // is thread safe. + // Returns true if there are bookmarks, otherwise returns false. + // This method is thread safe. bool HasBookmarks(); - // Returns true if there is a bookmark for the specified URL. This method is - // thread safe. See BookmarkService for more details on this. - virtual bool IsBookmarked(const GURL& url); + // Returns true if there is a bookmark for the specified URL. + // This method is thread safe. + // See BookmarkService for more details on this. + virtual bool IsBookmarked(const GURL& url) OVERRIDE; + + // Returns all the bookmarked urls. + // This method is thread safe. + // See BookmarkService for more details on this. + virtual void GetBookmarks(std::vector<GURL>* urls) OVERRIDE; - // Blocks until loaded; this is NOT invoked on the main thread. See - // BookmarkService for more details on this. - virtual void BlockTillLoaded(); + // Blocks until loaded; this is NOT invoked on the main thread. + // See BookmarkService for more details on this. + virtual void BlockTillLoaded() OVERRIDE; // Returns the node with the specified id, or NULL if there is no node with // the specified id. @@ -406,7 +410,7 @@ class BookmarkModel : public NotificationObserver, public BookmarkService { // NotificationObserver: virtual void Observe(int type, const NotificationSource& source, - const NotificationDetails& details); + const NotificationDetails& details) OVERRIDE; // Generates and returns the next node ID. int64 generate_next_node_id(); |