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

Unified Diff: chrome/browser/ui/webui/cookies_tree_model_util.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/cookies_tree_model_util.cc
diff --git a/chrome/browser/ui/webui/cookies_tree_model_util.cc b/chrome/browser/ui/webui/cookies_tree_model_util.cc
index 5a81bd5952e6dcd85a195efa47d03aeec06cb28a..d5311963735db722aaf403ba706f2a002def79fa 100644
--- a/chrome/browser/ui/webui/cookies_tree_model_util.cc
+++ b/chrome/browser/ui/webui/cookies_tree_model_util.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/webui/cookies_tree_model_util.h"
#include <memory>
+#include <utility>
#include <vector>
#include "base/i18n/time_formatting.h"
@@ -328,7 +329,7 @@ void CookiesTreeModelUtil::GetChildNodeList(const CookieTreeNode* parent,
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
const CookieTreeNode* child = parent->GetChild(start + i);
if (GetCookieTreeNodeDictionary(*child, dict.get()))
- nodes->Append(dict.release());
+ nodes->Append(std::move(dict));
}
}

Powered by Google App Engine
This is Rietveld 408576698