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

Unified Diff: ash/touch/touch_hud_debug.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: ash/touch/touch_hud_debug.cc
diff --git a/ash/touch/touch_hud_debug.cc b/ash/touch/touch_hud_debug.cc
index 57b96560195ee0c2c32c848ec78d3ffb646e5eaa..9616ab976185946a438d1e7987abe1400c0c8009 100644
--- a/ash/touch/touch_hud_debug.cc
+++ b/ash/touch/touch_hud_debug.cc
@@ -160,7 +160,7 @@ class TouchTrace {
std::unique_ptr<base::ListValue> GetAsList() const {
std::unique_ptr<base::ListValue> list(new base::ListValue());
for (const_iterator i = log_.begin(); i != log_.end(); ++i)
- list->Append((*i).GetAsDictionary().release());
+ list->Append((*i).GetAsDictionary());
return list;
}
@@ -196,7 +196,7 @@ class TouchLog {
std::unique_ptr<base::ListValue> list(new base::ListValue());
for (int i = 0; i < kMaxPaths; ++i) {
if (!traces_[i].log().empty())
- list->Append(traces_[i].GetAsList().release());
+ list->Append(traces_[i].GetAsList());
}
return list;
}
« no previous file with comments | « no previous file | base/trace_event/trace_event_unittest.cc » ('j') | extensions/browser/api/declarative/rules_registry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698