| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/task/cancelable_task_tracker.h" | 9 #include "base/task/cancelable_task_tracker.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Creates a new node with an id of 0 and |url|. | 42 // Creates a new node with an id of 0 and |url|. |
| 43 explicit BookmarkNode(const GURL& url); | 43 explicit BookmarkNode(const GURL& url); |
| 44 // Creates a new node with |id| and |url|. | 44 // Creates a new node with |id| and |url|. |
| 45 BookmarkNode(int64 id, const GURL& url); | 45 BookmarkNode(int64 id, const GURL& url); |
| 46 | 46 |
| 47 virtual ~BookmarkNode(); | 47 virtual ~BookmarkNode(); |
| 48 | 48 |
| 49 // Set the node's internal title. Note that this neither invokes observers | 49 // Set the node's internal title. Note that this neither invokes observers |
| 50 // nor updates any bookmark model this node may be in. For that functionality, | 50 // nor updates any bookmark model this node may be in. For that functionality, |
| 51 // BookmarkModel::SetTitle(..) should be used instead. | 51 // BookmarkModel::SetTitle(..) should be used instead. |
| 52 virtual void SetTitle(const base::string16& title) OVERRIDE; | 52 virtual void SetTitle(const base::string16& title) override; |
| 53 | 53 |
| 54 // Returns an unique id for this node. | 54 // Returns an unique id for this node. |
| 55 // For bookmark nodes that are managed by the bookmark model, the IDs are | 55 // For bookmark nodes that are managed by the bookmark model, the IDs are |
| 56 // persisted across sessions. | 56 // persisted across sessions. |
| 57 int64 id() const { return id_; } | 57 int64 id() const { return id_; } |
| 58 void set_id(int64 id) { id_ = id; } | 58 void set_id(int64 id) { id_ = id; } |
| 59 | 59 |
| 60 const GURL& url() const { return url_; } | 60 const GURL& url() const { return url_; } |
| 61 void set_url(const GURL& url) { url_ = url; } | 61 void set_url(const GURL& url) { url_ = url; } |
| 62 | 62 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // Node used for the permanent folders (excluding the root). | 194 // Node used for the permanent folders (excluding the root). |
| 195 class BookmarkPermanentNode : public BookmarkNode { | 195 class BookmarkPermanentNode : public BookmarkNode { |
| 196 public: | 196 public: |
| 197 explicit BookmarkPermanentNode(int64 id); | 197 explicit BookmarkPermanentNode(int64 id); |
| 198 virtual ~BookmarkPermanentNode(); | 198 virtual ~BookmarkPermanentNode(); |
| 199 | 199 |
| 200 // WARNING: this code is used for other projects. Contact noyau@ for details. | 200 // WARNING: this code is used for other projects. Contact noyau@ for details. |
| 201 void set_visible(bool value) { visible_ = value; } | 201 void set_visible(bool value) { visible_ = value; } |
| 202 | 202 |
| 203 // BookmarkNode overrides: | 203 // BookmarkNode overrides: |
| 204 virtual bool IsVisible() const OVERRIDE; | 204 virtual bool IsVisible() const override; |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 bool visible_; | 207 bool visible_; |
| 208 | 208 |
| 209 DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode); | 209 DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode); |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ | 212 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ |
| OLD | NEW |