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

Unified Diff: net/quic/quic_client_session.cc

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed 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/proxy/proxy_service.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index b5f1d98bd6766bb527d44e1f94423c8bfc7f0b3c..c86e76a7079df94bd0a46f392b15d6b6a526919b 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -96,18 +96,18 @@ void RecordHandshakeState(HandshakeState state) {
NUM_HANDSHAKE_STATES);
}
-base::Value* NetLogQuicClientSessionCallback(
+scoped_ptr<base::Value> NetLogQuicClientSessionCallback(
const QuicServerId* server_id,
bool require_confirmation,
NetLogCaptureMode /* capture_mode */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("host", server_id->host());
dict->SetInteger("port", server_id->port());
dict->SetBoolean("is_https", server_id->is_https());
dict->SetBoolean("privacy_mode",
server_id->privacy_mode() == PRIVACY_MODE_ENABLED);
dict->SetBoolean("require_confirmation", require_confirmation);
- return dict;
+ return dict.Pass();
}
} // namespace
@@ -832,7 +832,7 @@ void QuicClientSession::CloseAllObservers(int net_error) {
base::Value* QuicClientSession::GetInfoAsValue(
const std::set<HostPortPair>& aliases) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("version", QuicVersionToString(connection()->version()));
dict->SetInteger("open_streams", GetNumOpenStreams());
base::ListValue* stream_list = new base::ListValue();
@@ -863,7 +863,7 @@ base::Value* QuicClientSession::GetInfoAsValue(
}
dict->Set("aliases", alias_list);
- return dict;
+ return dict.release();
}
base::WeakPtr<QuicClientSession> QuicClientSession::GetWeakPtr() {
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698