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

Unified Diff: chrome/browser/win/enumerate_modules_model.cc

Issue 2809933003: Remove ListValue::Append(raw ptr) on Win (Closed)
Patch Set: Includes Created 3 years, 8 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 | « base/values.cc ('k') | components/policy/core/common/policy_loader_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/enumerate_modules_model.cc
diff --git a/chrome/browser/win/enumerate_modules_model.cc b/chrome/browser/win/enumerate_modules_model.cc
index 9a088ef03300506dff5d6f7049b00b8419ff0c9a..7f02a70cfb02ea6d980dd32bd92e322879ebdeed 100644
--- a/chrome/browser/win/enumerate_modules_model.cc
+++ b/chrome/browser/win/enumerate_modules_model.cc
@@ -15,6 +15,7 @@
#include <algorithm>
#include <set>
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/command_line.h"
@@ -24,6 +25,7 @@
#include "base/file_version_info.h"
#include "base/i18n/case_conversion.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/scoped_generic.h"
#include "base/strings/string_number_conversions.h"
@@ -606,7 +608,7 @@ base::ListValue* EnumerateModulesModel::GetModuleList() {
for (ModuleEnumerator::ModulesVector::const_iterator module =
enumerated_modules_.begin();
module != enumerated_modules_.end(); ++module) {
- base::DictionaryValue* data = new base::DictionaryValue();
+ auto data = base::MakeUnique<base::DictionaryValue>();
data->SetInteger("type", module->type);
base::string16 type_string;
if ((module->type & ModuleEnumerator::LOADED_MODULE) == 0) {
@@ -670,7 +672,7 @@ base::ListValue* EnumerateModulesModel::GetModuleList() {
// TODO(chrisha): Set help_url when we have a meaningful place for users
// to land.
- list->Append(data);
+ list->Append(std::move(data));
}
return list;
« no previous file with comments | « base/values.cc ('k') | components/policy/core/common/policy_loader_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698