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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.h

Issue 2379863002: Fix object ownership in ui/base/models. (Closed)
Patch Set: fix Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/bookmarks/bookmark_editor_view.h
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h
index 0bd8f631d6aa65a56436e00498fc8cc9cbad8174..128e6b50e6ae60e9255b9ea778114a98f0f38cb4 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <vector>
#include "base/compiler_specific.h"
@@ -62,8 +63,8 @@ class BookmarkEditorView : public BookmarkEditor,
// empty strings. Public purely for testing.
class EditorTreeModel : public ui::TreeNodeModel<EditorNode> {
public:
- explicit EditorTreeModel(EditorNode* root)
- : ui::TreeNodeModel<EditorNode>(root) {}
+ explicit EditorTreeModel(std::unique_ptr<EditorNode> root)
+ : ui::TreeNodeModel<EditorNode>(std::move(root)) {}
void SetTitle(ui::TreeModelNode* node,
const base::string16& title) override;
@@ -169,7 +170,7 @@ class BookmarkEditorView : public BookmarkEditor,
// Creates a returns the new root node. This invokes CreateNodes to do
// the real work.
- EditorNode* CreateRootNode();
+ std::unique_ptr<EditorNode> CreateRootNode();
// Adds and creates a child node in b_node for all children of bb_node that
// are folders.
@@ -209,7 +210,7 @@ class BookmarkEditorView : public BookmarkEditor,
// Creates a new folder as a child of the selected node. If no node is
// selected, the new folder is added as a child of the bookmark node. Starts
- // editing on the new gorup as well.
+ // editing on the new group as well.
void NewFolder();
// Creates a new EditorNode as the last child of parent. The new node is
« no previous file with comments | « chrome/browser/browsing_data/cookies_tree_model_unittest.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698