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

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

Issue 242823002: Extract GetNodeByID() method from BookmarkModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Returns all the bookmarked urls and their titles. 166 // Returns all the bookmarked urls and their titles.
167 // This method is thread safe. 167 // This method is thread safe.
168 // See BookmarkService for more details on this. 168 // See BookmarkService for more details on this.
169 virtual void GetBookmarks( 169 virtual void GetBookmarks(
170 std::vector<BookmarkService::URLAndTitle>* urls) OVERRIDE; 170 std::vector<BookmarkService::URLAndTitle>* urls) OVERRIDE;
171 171
172 // Blocks until loaded; this is NOT invoked on the main thread. 172 // Blocks until loaded; this is NOT invoked on the main thread.
173 // See BookmarkService for more details on this. 173 // See BookmarkService for more details on this.
174 virtual void BlockTillLoaded() OVERRIDE; 174 virtual void BlockTillLoaded() OVERRIDE;
175 175
176 // Returns the node with |id|, or NULL if there is no node with |id|.
177 const BookmarkNode* GetNodeByID(int64 id) const;
178
179 // Adds a new folder node at the specified position. 176 // Adds a new folder node at the specified position.
180 const BookmarkNode* AddFolder(const BookmarkNode* parent, 177 const BookmarkNode* AddFolder(const BookmarkNode* parent,
181 int index, 178 int index,
182 const base::string16& title); 179 const base::string16& title);
183 180
184 // Adds a url at the specified position. 181 // Adds a url at the specified position.
185 const BookmarkNode* AddURL(const BookmarkNode* parent, 182 const BookmarkNode* AddURL(const BookmarkNode* parent,
186 int index, 183 int index,
187 const base::string16& title, 184 const base::string16& title,
188 const GURL& url); 185 const GURL& url);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 392
396 // See description of IsDoingExtensiveChanges above. 393 // See description of IsDoingExtensiveChanges above.
397 int extensive_changes_; 394 int extensive_changes_;
398 395
399 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; 396 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_;
400 397
401 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); 398 DISALLOW_COPY_AND_ASSIGN(BookmarkModel);
402 }; 399 };
403 400
404 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ 401 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698