OLD | NEW |
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 // Returns the node with the specified id, or NULL if there is no node with | 264 // Returns the node with the specified id, or NULL if there is no node with |
265 // the specified id. | 265 // the specified id. |
266 const BookmarkNode* GetNodeByID(int64 id); | 266 const BookmarkNode* GetNodeByID(int64 id); |
267 | 267 |
268 // Adds a new group node at the specified position. | 268 // Adds a new group node at the specified position. |
269 const BookmarkNode* AddGroup(const BookmarkNode* parent, | 269 const BookmarkNode* AddGroup(const BookmarkNode* parent, |
270 int index, | 270 int index, |
271 const string16& title); | 271 const string16& title); |
272 | 272 |
273 // TODO(munjal): Remove wstring overload once all code is moved to string16. | |
274 // Adds a url at the specified position. | 273 // Adds a url at the specified position. |
275 #if !defined(WCHAR_T_IS_UTF16) | |
276 const BookmarkNode* AddURL(const BookmarkNode* parent, | |
277 int index, | |
278 const std::wstring& title, | |
279 const GURL& url); | |
280 #endif | |
281 const BookmarkNode* AddURL(const BookmarkNode* parent, | 274 const BookmarkNode* AddURL(const BookmarkNode* parent, |
282 int index, | 275 int index, |
283 const string16& title, | 276 const string16& title, |
284 const GURL& url); | 277 const GURL& url); |
285 | 278 |
286 // Adds a url with a specific creation date. | 279 // Adds a url with a specific creation date. |
287 const BookmarkNode* AddURLWithCreationTime(const BookmarkNode* parent, | 280 const BookmarkNode* AddURLWithCreationTime(const BookmarkNode* parent, |
288 int index, | 281 int index, |
289 const string16& title, | 282 const string16& title, |
290 const GURL& url, | 283 const GURL& url, |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 scoped_refptr<BookmarkStorage> store_; | 467 scoped_refptr<BookmarkStorage> store_; |
475 | 468 |
476 scoped_ptr<BookmarkIndex> index_; | 469 scoped_ptr<BookmarkIndex> index_; |
477 | 470 |
478 base::WaitableEvent loaded_signal_; | 471 base::WaitableEvent loaded_signal_; |
479 | 472 |
480 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 473 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
481 }; | 474 }; |
482 | 475 |
483 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 476 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
OLD | NEW |