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

Side by Side Diff: net/spdy/spdy_session.h

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, 6 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 unified diff | Download patch
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SPDY_SPDY_SESSION_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_H_
6 #define NET_SPDY_SPDY_SESSION_H_ 6 #define NET_SPDY_SPDY_SESSION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // STATE_GOING_AWAY. After this function, DcheckGoingAway() will 390 // STATE_GOING_AWAY. After this function, DcheckGoingAway() will
391 // pass. May be called multiple times. 391 // pass. May be called multiple times.
392 void StartGoingAway(SpdyStreamId last_good_stream_id, Error status); 392 void StartGoingAway(SpdyStreamId last_good_stream_id, Error status);
393 393
394 // Must be called only when going away (i.e., DcheckGoingAway() 394 // Must be called only when going away (i.e., DcheckGoingAway()
395 // passes). If there are no more active streams and the session 395 // passes). If there are no more active streams and the session
396 // isn't closed yet, close it. 396 // isn't closed yet, close it.
397 void MaybeFinishGoingAway(); 397 void MaybeFinishGoingAway();
398 398
399 // Retrieves information on the current state of the SPDY session as a 399 // Retrieves information on the current state of the SPDY session as a
400 // Value. Caller takes possession of the returned value. 400 // Value.
401 base::Value* GetInfoAsValue() const; 401 scoped_ptr<base::Value> GetInfoAsValue() const;
402 402
403 // Indicates whether the session is being reused after having successfully 403 // Indicates whether the session is being reused after having successfully
404 // used to send/receive data in the past or if the underlying socket was idle 404 // used to send/receive data in the past or if the underlying socket was idle
405 // before being used for a SPDY session. 405 // before being used for a SPDY session.
406 bool IsReused() const; 406 bool IsReused() const;
407 407
408 // Returns true if the underlying transport socket ever had any reads or 408 // Returns true if the underlying transport socket ever had any reads or
409 // writes. 409 // writes.
410 bool WasEverUsed() const { 410 bool WasEverUsed() const {
411 return connection_->socket()->WasEverUsed(); 411 return connection_->socket()->WasEverUsed();
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 // Used for posting asynchronous IO tasks. We use this even though 1183 // Used for posting asynchronous IO tasks. We use this even though
1184 // SpdySession is refcounted because we don't need to keep the SpdySession 1184 // SpdySession is refcounted because we don't need to keep the SpdySession
1185 // alive if the last reference is within a RunnableMethod. Just revoke the 1185 // alive if the last reference is within a RunnableMethod. Just revoke the
1186 // method. 1186 // method.
1187 base::WeakPtrFactory<SpdySession> weak_factory_; 1187 base::WeakPtrFactory<SpdySession> weak_factory_;
1188 }; 1188 };
1189 1189
1190 } // namespace net 1190 } // namespace net
1191 1191
1192 #endif // NET_SPDY_SPDY_SESSION_H_ 1192 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698