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

Side by Side Diff: ui/base/models/tree_node_model.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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
« no previous file with comments | « ui/base/models/list_model_unittest.cc ('k') | ui/base/models/tree_node_model_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_BASE_MODELS_TREE_NODE_MODEL_H_ 5 #ifndef UI_BASE_MODELS_TREE_NODE_MODEL_H_
6 #define UI_BASE_MODELS_TREE_NODE_MODEL_H_ 6 #define UI_BASE_MODELS_TREE_NODE_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <memory>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/stl_util.h" 17 #include "base/stl_util.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "ui/base/models/tree_model.h" 19 #include "ui/base/models/tree_model.h"
20 20
21 namespace ui { 21 namespace ui {
22 22
23 // TreeNodeModel and TreeNodes provide an implementation of TreeModel around 23 // TreeNodeModel and TreeNodes provide an implementation of TreeModel around
24 // TreeNodes. 24 // TreeNodes.
25 // 25 //
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 DCHECK(node); 291 DCHECK(node);
292 AsNode(node)->SetTitle(title); 292 AsNode(node)->SetTitle(title);
293 NotifyObserverTreeNodeChanged(node); 293 NotifyObserverTreeNodeChanged(node);
294 } 294 }
295 295
296 private: 296 private:
297 // The observers. 297 // The observers.
298 base::ObserverList<TreeModelObserver> observer_list_; 298 base::ObserverList<TreeModelObserver> observer_list_;
299 299
300 // The root. 300 // The root.
301 scoped_ptr<NodeType> root_; 301 std::unique_ptr<NodeType> root_;
302 302
303 DISALLOW_COPY_AND_ASSIGN(TreeNodeModel); 303 DISALLOW_COPY_AND_ASSIGN(TreeNodeModel);
304 }; 304 };
305 305
306 } // namespace ui 306 } // namespace ui
307 307
308 #endif // UI_BASE_MODELS_TREE_NODE_MODEL_H_ 308 #endif // UI_BASE_MODELS_TREE_NODE_MODEL_H_
OLDNEW
« no previous file with comments | « ui/base/models/list_model_unittest.cc ('k') | ui/base/models/tree_node_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698