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

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: 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_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 389ac5213d3fa7ea62bf96305651840bd5ee9b84..ab4f78eda3ff0104508f420d13654cbb0c6a5733 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -259,25 +259,26 @@ 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->Set("sessions",
+ quic_stream_factory_.QuicStreamFactoryInfoToValue().Pass());
eroman 2015/05/25 17:48:56 Remove .Pass()
payal.pandey 2015/05/26 06:24:15 Done.
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() {

Powered by Google App Engine
This is Rietveld 408576698