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

Side by Side Diff: chrome/browser/bookmarks/bookmark_model.h

Issue 3181030: bookmarks: Add HasBookmarks() method to BookmarkModel API. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Returns the set of nodes with the specified URL. 246 // Returns the set of nodes with the specified URL.
247 void GetNodesByURL(const GURL& url, std::vector<const BookmarkNode*>* nodes); 247 void GetNodesByURL(const GURL& url, std::vector<const BookmarkNode*>* nodes);
248 248
249 // Returns the most recently added node for the url. Returns NULL if url is 249 // Returns the most recently added node for the url. Returns NULL if url is
250 // not bookmarked. 250 // not bookmarked.
251 const BookmarkNode* GetMostRecentlyAddedNodeForURL(const GURL& url); 251 const BookmarkNode* GetMostRecentlyAddedNodeForURL(const GURL& url);
252 252
253 // Returns all the bookmarked urls. This method is thread safe. 253 // Returns all the bookmarked urls. This method is thread safe.
254 virtual void GetBookmarks(std::vector<GURL>* urls); 254 virtual void GetBookmarks(std::vector<GURL>* urls);
255 255
256 // Returns true if there are bookmarks, otherwise returns false. This method
257 // is thread safe.
258 bool HasBookmarks();
259
256 // Returns true if there is a bookmark for the specified URL. This method is 260 // Returns true if there is a bookmark for the specified URL. This method is
257 // thread safe. See BookmarkService for more details on this. 261 // thread safe. See BookmarkService for more details on this.
258 virtual bool IsBookmarked(const GURL& url); 262 virtual bool IsBookmarked(const GURL& url);
259 263
260 // Blocks until loaded; this is NOT invoked on the main thread. See 264 // Blocks until loaded; this is NOT invoked on the main thread. See
261 // BookmarkService for more details on this. 265 // BookmarkService for more details on this.
262 virtual void BlockTillLoaded(); 266 virtual void BlockTillLoaded();
263 267
264 // Returns the node with the specified id, or NULL if there is no node with 268 // Returns the node with the specified id, or NULL if there is no node with
265 // the specified id. 269 // the specified id.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 scoped_refptr<BookmarkStorage> store_; 478 scoped_refptr<BookmarkStorage> store_;
475 479
476 scoped_ptr<BookmarkIndex> index_; 480 scoped_ptr<BookmarkIndex> index_;
477 481
478 base::WaitableEvent loaded_signal_; 482 base::WaitableEvent loaded_signal_;
479 483
480 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); 484 DISALLOW_COPY_AND_ASSIGN(BookmarkModel);
481 }; 485 };
482 486
483 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ 487 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698