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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership 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
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/media/media_internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 0bfa651cbe006f3da6c3cb703140cc90370a8d32..65ad92a3e252f1b82fbbf41ea794bfc5fef4af20 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -4,6 +4,9 @@
#include "content/browser/gpu/gpu_data_manager_impl_private.h"
+#include <memory>
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
@@ -911,11 +914,11 @@ void GpuDataManagerImplPrivate::ProcessCrashed(
base::ListValue* GpuDataManagerImplPrivate::GetLogMessages() const {
base::ListValue* value = new base::ListValue;
for (size_t ii = 0; ii < log_messages_.size(); ++ii) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("level", log_messages_[ii].level);
dict->SetString("header", log_messages_[ii].header);
dict->SetString("message", log_messages_[ii].message);
- value->Append(dict);
+ value->Append(std::move(dict));
}
return value;
}
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/media/media_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698