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

Unified Diff: chrome/browser/ui/webui/options/handler_options_handler.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: No ListValue::SetDouble 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
Index: chrome/browser/ui/webui/options/handler_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc
index 0e5ea47773ccf5c383087ac1f52bba846da501d2..73b3fdea0a3edbd443deab4199462817c30c9966 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.cc
+++ b/chrome/browser/ui/webui/options/handler_options_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"
@@ -115,9 +116,10 @@ void HandlerOptionsHandler::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 HandlerOptionsHandler::GetIgnoredHandlers(base::ListValue* handlers) {
« no previous file with comments | « chrome/browser/ui/webui/options/core_options_handler.cc ('k') | chrome/browser/ui/webui/options/language_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698