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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_bookmarks_handler.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/supervised_user/supervised_user_bookmarks_handler.h" 5 #include "chrome/browser/supervised_user/supervised_user_bookmarks_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
206 } 206 }
207 } 207 }
208 208
209 bool SupervisedUserBookmarksHandler::AddNodeToTree( 209 bool SupervisedUserBookmarksHandler::AddNodeToTree(
210 int parent_id, 210 int parent_id,
211 std::unique_ptr<base::DictionaryValue> node) { 211 std::unique_ptr<base::DictionaryValue> node) {
212 base::ListValue* parent = FindFolder(root_.get(), parent_id); 212 base::ListValue* parent = FindFolder(root_.get(), parent_id);
213 if (!parent) 213 if (!parent)
214 return false; 214 return false;
215 parent->Append(node.release()); 215 parent->Append(std::move(node));
216 return true; 216 return true;
217 } 217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698