| Index: components/bookmarks/browser/bookmark_node.h
|
| diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks/browser/bookmark_node.h
|
| index d125c44e52c92806cea31a7297925411baba0182..c3d26e50e15e2eddb87aabc2b22f66e8c116e60a 100644
|
| --- a/components/bookmarks/browser/bookmark_node.h
|
| +++ b/components/bookmarks/browser/bookmark_node.h
|
| @@ -10,6 +10,7 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/task/cancelable_task_tracker.h"
|
| #include "base/time/time.h"
|
| #include "components/bookmarks/browser/titled_url_node.h"
|
| @@ -69,7 +70,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
|
|
| // Returns the favicon's URL. Returns an empty URL if there is no favicon
|
| // associated with this bookmark.
|
| - const GURL& icon_url() const { return icon_url_; }
|
| + const GURL* icon_url() const { return icon_url_ ? icon_url_.get() : nullptr; }
|
|
|
| Type type() const { return type_; }
|
| void set_type(Type type) { type_ = type; }
|
| @@ -134,7 +135,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
|
|
| // Sets the favicon's URL.
|
| void set_icon_url(const GURL& icon_url) {
|
| - icon_url_ = icon_url;
|
| + icon_url_ = base::MakeUnique<GURL>(icon_url);
|
| }
|
|
|
| // Returns the favicon. In nearly all cases you should use the method
|
| @@ -179,7 +180,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
| favicon_base::IconType favicon_type_;
|
|
|
| // The URL of the node's favicon.
|
| - GURL icon_url_;
|
| + std::unique_ptr<GURL> icon_url_;
|
|
|
| // The loading state of the favicon.
|
| FaviconState favicon_state_;
|
|
|