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

Unified Diff: jingle/glue/pseudotcp_adapter.h

Issue 9433027: Delete Session and SessionManager object synchronously. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 10 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
Index: jingle/glue/pseudotcp_adapter.h
diff --git a/jingle/glue/pseudotcp_adapter.h b/jingle/glue/pseudotcp_adapter.h
index 91811e93c6351a8d4bde6199893f1f3d67bccd40..50587051105c11a2259c1c7cd9de59a9122e5271 100644
--- a/jingle/glue/pseudotcp_adapter.h
+++ b/jingle/glue/pseudotcp_adapter.h
@@ -29,6 +29,11 @@ class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe {
PseudoTcpAdapter(net::Socket* socket);
virtual ~PseudoTcpAdapter();
+ // Sets callback that should be called when the adapter is being
+ // destroyed. The callback is not allowed to touch the adapter, but
+ // can do anything else.
+ void SetOnDestroyedCallback(const base::Closure& callback);
+
// net::Socket implementation.
virtual int Read(net::IOBuffer* buffer, int buffer_size,
const net::CompletionCallback& callback) OVERRIDE;
@@ -61,6 +66,8 @@ class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe {
private:
class Core;
+ base::Closure destruction_callback_;
+
scoped_refptr<Core> core_;
net::BoundNetLog net_log_;

Powered by Google App Engine
This is Rietveld 408576698