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

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

Issue 2336863003: Change more base::ListValue methods to use std::unique_ptr. (Closed)
Patch Set: . Created 4 years, 3 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 | « components/user_manager/user_manager_base.cc ('k') | extensions/browser/script_executor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 8d9e1b6a27268427dcf2fa6207765eafff433e5e..e6305af5c565d785234e0faf25d9f29419e33be6 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -13,6 +13,7 @@
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "base/sys_info.h"
@@ -378,7 +379,7 @@ base::Value* GetProblems() {
manager->GetBlacklistReasons(problem_list);
if (gpu_access_blocked) {
- base::DictionaryValue* problem = new base::DictionaryValue();
+ auto problem = base::MakeUnique<base::DictionaryValue>();
problem->SetString("description",
"GPU process was unable to boot: " + gpu_access_blocked_reason);
problem->Set("crBugs", new base::ListValue());
@@ -387,7 +388,7 @@ base::Value* GetProblems() {
disabled_features->AppendString("all");
problem->Set("affectedGpuSettings", disabled_features);
problem->SetString("tag", "disabledFeatures");
- problem_list->Insert(0, problem);
+ problem_list->Insert(0, std::move(problem));
}
bool eof = false;
« no previous file with comments | « components/user_manager/user_manager_base.cc ('k') | extensions/browser/script_executor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698