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)); |