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

Unified Diff: gpu/config/gpu_control_list.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 | « google_apis/drive/drive_api_requests.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_control_list.cc
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc
index d8f690a469057e869a1339950ddd37f413b09cd6..5561d32fa6c0d084435937cb522b0cbf02deb51c 100644
--- a/gpu/config/gpu_control_list.cc
+++ b/gpu/config/gpu_control_list.cc
@@ -7,6 +7,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
+
#include "base/cpu.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
@@ -1530,7 +1532,7 @@ void GpuControlList::GetReasons(base::ListValue* problem_list,
GpuControlListEntry* entry = active_entries_[i].get();
if (entry->disabled())
continue;
- base::DictionaryValue* problem = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> problem(new base::DictionaryValue());
problem->SetString("description", entry->description());
@@ -1552,7 +1554,7 @@ void GpuControlList::GetReasons(base::ListValue* problem_list,
DCHECK(tag == "workarounds" || tag == "disabledFeatures");
problem->SetString("tag", tag);
- problem_list->Append(problem);
+ problem_list->Append(std::move(problem));
}
}
« no previous file with comments | « google_apis/drive/drive_api_requests.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698