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

Unified Diff: net/quic/quic_stream_factory.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/quic/quic_stream_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index d4dce694cf9471cd02a74bb9db352d876de1ae05..b9a4123d462cb218b3e599da4c0407339873290e 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -925,8 +925,9 @@ void QuicStreamFactory::CloseAllSessions(int error) {
DCHECK(all_sessions_.empty());
}
-base::Value* QuicStreamFactory::QuicStreamFactoryInfoToValue() const {
- base::ListValue* list = new base::ListValue();
+scoped_ptr<base::Value> QuicStreamFactory::QuicStreamFactoryInfoToValue()
+ const {
+ scoped_ptr<base::ListValue> list(new base::ListValue());
for (SessionMap::const_iterator it = active_sessions_.begin();
it != active_sessions_.end(); ++it) {
@@ -943,7 +944,7 @@ base::Value* QuicStreamFactory::QuicStreamFactoryInfoToValue() const {
list->Append(session->GetInfoAsValue(hosts));
}
}
- return list;
+ return list.Pass();
}
void QuicStreamFactory::ClearCachedStatesInCryptoConfig() {
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698