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

Unified Diff: content/browser/service_worker/service_worker_internals_ui.cc

Issue 2891933004: Remove raw base::DictionaryValue::Set in //content (Closed)
Patch Set: Rebase Created 3 years, 7 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
Index: content/browser/service_worker/service_worker_internals_ui.cc
diff --git a/content/browser/service_worker/service_worker_internals_ui.cc b/content/browser/service_worker/service_worker_internals_ui.cc
index 5dd7a48a09a23b28a45306d9fb2dd2d73a6414e2..8b061c3fccbd03489a8eaa18e66cafaff5727b84 100644
--- a/content/browser/service_worker/service_worker_internals_ui.cc
+++ b/content/browser/service_worker/service_worker_internals_ui.cc
@@ -194,16 +194,16 @@ std::unique_ptr<ListValue> GetRegistrationListValue(
if (registration.active_version.version_id !=
kInvalidServiceWorkerVersionId) {
- DictionaryValue* active_info = new DictionaryValue();
- UpdateVersionInfo(registration.active_version, active_info);
- registration_info->Set("active", active_info);
+ auto active_info = base::MakeUnique<DictionaryValue>();
+ UpdateVersionInfo(registration.active_version, active_info.get());
+ registration_info->Set("active", std::move(active_info));
}
if (registration.waiting_version.version_id !=
kInvalidServiceWorkerVersionId) {
- DictionaryValue* waiting_info = new DictionaryValue();
- UpdateVersionInfo(registration.waiting_version, waiting_info);
- registration_info->Set("waiting", waiting_info);
+ auto waiting_info = base::MakeUnique<DictionaryValue>();
+ UpdateVersionInfo(registration.waiting_version, waiting_info.get());
+ registration_info->Set("waiting", std::move(waiting_info));
}
result->Append(std::move(registration_info));
« no previous file with comments | « content/browser/net/network_errors_listing_ui.cc ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698