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

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

Issue 2086763002: Don't use deprecated ListValue::Append(Value*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 57bb50b12094763806ca758f44e297a8bc19ce06..0e5ea47773ccf5c383087ac1f52bba846da501d2 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.cc
+++ b/chrome/browser/ui/webui/options/handler_options_handler.cc
@@ -91,11 +91,11 @@ static void GetHandlersAsListValue(
base::ListValue* handler_list) {
ProtocolHandlerRegistry::ProtocolHandlerList::const_iterator handler;
for (handler = handlers.begin(); handler != handlers.end(); ++handler) {
- std::unique_ptr<base::ListValue> handlerValue(new base::ListValue());
- handlerValue->AppendString(handler->protocol());
- handlerValue->AppendString(handler->url().spec());
- handlerValue->AppendString(handler->url().host());
- handler_list->Append(std::move(handlerValue));
+ std::unique_ptr<base::ListValue> handler_value(new base::ListValue());
+ handler_value->AppendString(handler->protocol());
+ handler_value->AppendString(handler->url().spec());
+ handler_value->AppendString(handler->url().host());
+ handler_list->Append(std::move(handler_value));
}
}
@@ -135,9 +135,10 @@ void HandlerOptionsHandler::UpdateHandlerList() {
base::ListValue handlers;
for (std::vector<std::string>::iterator protocol = protocols.begin();
protocol != protocols.end(); protocol++) {
- base::DictionaryValue* handler_value = new base::DictionaryValue();
- GetHandlersForProtocol(*protocol, handler_value);
- handlers.Append(handler_value);
+ std::unique_ptr<base::DictionaryValue> handler_value(
+ new base::DictionaryValue());
+ GetHandlersForProtocol(*protocol, handler_value.get());
+ handlers.Append(std::move(handler_value));
}
std::unique_ptr<base::ListValue> ignored_handlers(new base::ListValue());

Powered by Google App Engine
This is Rietveld 408576698