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

Unified Diff: net/http/http_server_properties_impl.cc

Issue 1156563004: Convert bare pointer to scoped_ptr in net/http (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated Review comments Created 5 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: net/http/http_server_properties_impl.cc
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index bbf30c8b2f31f330611d66199ee191fa77816568..72b44ce2b045da9016870fe1e6274cbfa21d90e4 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -395,9 +395,10 @@ const AlternativeServiceMap& HttpServerPropertiesImpl::alternative_service_map()
return alternative_service_map_;
}
-base::Value* HttpServerPropertiesImpl::GetAlternativeServiceInfoAsValue()
+scoped_ptr<base::Value>
+HttpServerPropertiesImpl::GetAlternativeServiceInfoAsValue()
const {
- base::ListValue* dict_list = new base::ListValue();
+ scoped_ptr<base::ListValue> dict_list(new base::ListValue());
for (const auto& alternative_service_map_item : alternative_service_map_) {
const HostPortPair& host_port_pair = alternative_service_map_item.first;
const AlternativeServiceInfo& alternative_service_info =
@@ -417,7 +418,7 @@ base::Value* HttpServerPropertiesImpl::GetAlternativeServiceInfoAsValue()
dict->SetString("alternative_service", alternative_service_string);
dict_list->Append(dict.Pass());
}
- return dict_list;
+ return dict_list.Pass();
}
const SettingsMap& HttpServerPropertiesImpl::GetSpdySettings(

Powered by Google App Engine
This is Rietveld 408576698