Index: chrome/browser/ui/webui/settings/protocol_handlers_handler.cc |
diff --git a/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc b/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc |
index 70d02e81591188a2711a1164a7ac2c02df8bf540..c851eb51e1356e54c40dd006b685bcc6d7396e9a 100644 |
--- a/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc |
+++ b/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc |
@@ -11,6 +11,7 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
#include "chrome/browser/chrome_notification_types.h" |
@@ -99,9 +100,10 @@ void ProtocolHandlersHandler::GetHandlersForProtocol( |
handlers_value->SetBoolean("has_policy_recommendations", |
registry->HasPolicyRegisteredHandler(protocol)); |
- base::ListValue* handlers_list = new base::ListValue(); |
- GetHandlersAsListValue(registry->GetHandlersFor(protocol), handlers_list); |
- handlers_value->Set("handlers", handlers_list); |
+ auto handlers_list = base::MakeUnique<base::ListValue>(); |
+ GetHandlersAsListValue(registry->GetHandlersFor(protocol), |
+ handlers_list.get()); |
+ handlers_value->Set("handlers", std::move(handlers_list)); |
} |
void ProtocolHandlersHandler::GetIgnoredHandlers(base::ListValue* handlers) { |