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

Unified Diff: gpu/config/gpu_control_list.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 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/gaia/google_service_auth_error.cc ('k') | headless/lib/browser/headless_net_log.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 334ea2a1390c7b67b20b9bbd14f0340facc2919f..339eaa0c0b2b2078146abd72b9615136c3f05966 100644
--- a/gpu/config/gpu_control_list.cc
+++ b/gpu/config/gpu_control_list.cc
@@ -4,12 +4,16 @@
#include "gpu/config/gpu_control_list.h"
+#include <utility>
+
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
+#include "base/values.h"
#include "gpu/config/gpu_info.h"
#include "third_party/re2/src/re2/re2.h"
@@ -581,18 +585,18 @@ void GpuControlList::GetReasons(base::ListValue* problem_list,
DCHECK(problem_list);
for (auto index : active_entries_) {
const Entry& entry = entries_[index];
- std::unique_ptr<base::DictionaryValue> problem(new base::DictionaryValue());
+ auto problem = base::MakeUnique<base::DictionaryValue>();
problem->SetString("description", entry.description);
- base::ListValue* cr_bugs = new base::ListValue();
+ auto cr_bugs = base::MakeUnique<base::ListValue>();
for (size_t jj = 0; jj < entry.cr_bug_size; ++jj)
cr_bugs->AppendInteger(entry.cr_bugs[jj]);
- problem->Set("crBugs", cr_bugs);
+ problem->Set("crBugs", std::move(cr_bugs));
- base::ListValue* features = new base::ListValue();
- entry.GetFeatureNames(features, feature_map_);
- problem->Set("affectedGpuSettings", features);
+ auto features = base::MakeUnique<base::ListValue>();
+ entry.GetFeatureNames(features.get(), feature_map_);
+ problem->Set("affectedGpuSettings", std::move(features));
DCHECK(tag == "workarounds" || tag == "disabledFeatures");
problem->SetString("tag", tag);
« no previous file with comments | « google_apis/gaia/google_service_auth_error.cc ('k') | headless/lib/browser/headless_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698