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

Unified Diff: chrome/browser/bookmarks/bookmark_service.h

Issue 10825147: Made BookmarkService::GetBookmarks return both urls and title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: splited into 2 cls Created 8 years, 5 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: chrome/browser/bookmarks/bookmark_service.h
diff --git a/chrome/browser/bookmarks/bookmark_service.h b/chrome/browser/bookmarks/bookmark_service.h
index 39ba6f43b2178db56ef4b3b4d6a978b6a482f85d..0ff285e9224185a26a392ba8793177c1c9fff807 100644
--- a/chrome/browser/bookmarks/bookmark_service.h
+++ b/chrome/browser/bookmarks/bookmark_service.h
@@ -7,7 +7,8 @@
#include <vector>
-class GURL;
+#include "base/string16.h"
+#include "googleurl/src/gurl.h"
// BookmarkService provides a thread safe view of bookmarks. It is used by
// HistoryBackend when it needs to determine the set of bookmarked URLs
@@ -16,17 +17,23 @@ class GURL;
// BookmarkService is owned by Profile and deleted when the Profile is deleted.
class BookmarkService {
public:
+ struct Bookmark {
sky 2012/08/03 16:04:39 This name is too generic, how about URLAndTitle.
michaelbai 2012/08/03 17:57:49 I was thinking it might not so generic as it is de
+ string16 title;
+ GURL url;
+ };
+
// Returns true if the specified URL is bookmarked.
//
// If not on the main thread you *must* invoke BlockTillLoaded first.
virtual bool IsBookmarked(const GURL& url) = 0;
- // Returns, by reference in urls, the set of bookmarked urls. This returns
- // the unique set of URLs. For example, if two bookmarks reference the same
- // URL only one entry is added.
+ // Returns, by reference in |bookmarks|, the set of bookmarked urls and their
+ // titles. This returns the unique set of URLs. For example, if two bookmarks
+ // reference the same URL only one entry is added not matter the titles are
+ // same or not.
//
// If not on the main thread you *must* invoke BlockTillLoaded first.
- virtual void GetBookmarks(std::vector<GURL>* urls) = 0;
+ virtual void GetBookmarks(std::vector<Bookmark>* bookmarks) = 0;
// Blocks until loaded. This is intended for usage on a thread other than
// the main thread.

Powered by Google App Engine
This is Rietveld 408576698