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

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 1158653002: Returning scoped_ptr instead of raw pointer in SpdySessionPoolInfoToValue() 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/spdy/spdy_session_pool.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool.cc
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 98a162b13482496bd7d0f94971a28ed44aa2e589..43a959ad3fe61dea512cfe42c6ee4139047e4e61 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -248,8 +248,8 @@ void SpdySessionPool::CloseAllSessions() {
}
}
-base::Value* SpdySessionPool::SpdySessionPoolInfoToValue() const {
- base::ListValue* list = new base::ListValue();
+scoped_ptr<base::Value> SpdySessionPool::SpdySessionPoolInfoToValue() const {
+ scoped_ptr<base::ListValue> list(new base::ListValue());
for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
it != available_sessions_.end(); ++it) {
@@ -260,7 +260,7 @@ base::Value* SpdySessionPool::SpdySessionPoolInfoToValue() const {
if (key.Equals(session_key))
list->Append(it->second->GetInfoAsValue());
}
- return list;
+ return list.Pass();
}
void SpdySessionPool::OnIPAddressChanged() {
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698