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

Unified Diff: net/spdy/spdy_session.h

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. Created 9 years 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/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 3da2f1e4a0d80ffa2869b8da6de60166629658b9..72a995e5a03204e7890d9643d39a3f97083e9ef6 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -85,7 +85,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
RequestPriority priority,
scoped_refptr<SpdyStream>* spdy_stream,
const BoundNetLog& stream_net_log,
- OldCompletionCallback* callback);
+ const CompletionCallback& callback);
// Remove PendingCreateStream objects on transaction deletion
void CancelPendingCreateStreams(const scoped_refptr<SpdyStream>* spdy_stream);
@@ -234,11 +234,12 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
int GetPeerAddress(AddressList* address) const;
int GetLocalAddress(IPEndPoint* address) const;
- // LayeredPool methods:
+ // LayeredPool implementation.
virtual bool CloseOneIdleConnection() OVERRIDE;
private:
friend class base::RefCounted<SpdySession>;
+
// Allow tests to access our innards for testing purposes.
FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, Ping);
FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, FailedPing);
@@ -248,15 +249,19 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
PendingCreateStream(const GURL& url, RequestPriority priority,
scoped_refptr<SpdyStream>* spdy_stream,
const BoundNetLog& stream_net_log,
- OldCompletionCallback* callback)
- : url(&url), priority(priority), spdy_stream(spdy_stream),
- stream_net_log(&stream_net_log), callback(callback) { }
+ const CompletionCallback& callback)
+ : url(&url),
+ priority(priority),
+ spdy_stream(spdy_stream),
+ stream_net_log(&stream_net_log),
+ callback(callback) {}
+ ~PendingCreateStream();
const GURL* url;
RequestPriority priority;
scoped_refptr<SpdyStream>* spdy_stream;
const BoundNetLog* stream_net_log;
- OldCompletionCallback* callback;
+ CompletionCallback callback;
};
typedef std::queue<PendingCreateStream, std::list< PendingCreateStream> >
PendingCreateStreamQueue;
@@ -267,10 +272,11 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
struct CallbackResultPair {
CallbackResultPair() : result(OK) {}
- CallbackResultPair(OldCompletionCallback* callback_in, int result_in)
+ CallbackResultPair(const CompletionCallback& callback_in, int result_in)
: callback(callback_in), result(result_in) {}
+ ~CallbackResultPair();
- OldCompletionCallback* callback;
+ CompletionCallback callback;
int result;
};

Powered by Google App Engine
This is Rietveld 408576698