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

Unified Diff: net/http/http_network_session.cc

Issue 1149243003: Returning scoped_ptr instead of raw pointer in QuicInfoToValue in net/ (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
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/quic_client_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 389ac5213d3fa7ea62bf96305651840bd5ee9b84..521aa775be27edae4a82a05297e0b6a004eff499 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -259,25 +259,25 @@ base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const {
return spdy_session_pool_.SpdySessionPoolInfoToValue();
}
-base::Value* HttpNetworkSession::QuicInfoToValue() const {
+scoped_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue());
dict->SetBoolean("quic_enabled", params_.enable_quic);
dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies);
dict->SetBoolean("enable_quic_port_selection",
params_.enable_quic_port_selection);
- base::ListValue* connection_options = new base::ListValue;
+ scoped_ptr<base::ListValue> connection_options(new base::ListValue);
for (QuicTagVector::const_iterator it =
params_.quic_connection_options.begin();
it != params_.quic_connection_options.end(); ++it) {
connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'");
}
- dict->Set("connection_options", connection_options);
+ dict->Set("connection_options", connection_options.Pass());
dict->SetString("origin_to_force_quic_on",
params_.origin_to_force_quic_on.ToString());
dict->SetDouble("alternative_service_probability_threshold",
params_.alternative_service_probability_threshold);
- return dict.release();
+ return dict.Pass();
}
void HttpNetworkSession::CloseAllConnections() {
« no previous file with comments | « net/http/http_network_session.h ('k') | net/quic/quic_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698