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

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: add tests 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..fd7781f0e3e05ade9bfa3902cb00b103c34d59d2 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, e.g. destroy the TransportChannel.
+ void SetOnDestroyedCallback(const base::Closure& callback);
Wez 2012/02/22 22:51:38 We only need this because the Transport implementa
Sergey Ulanov 2012/02/22 23:36:32 No. The problem is that PseudoTcpAdapter::Core may
Wez 2012/02/23 19:33:42 Ouch! I wonder if we could tear down the underlyi
Sergey Ulanov 2012/02/23 22:10:06 Agree, that's a better approach. Done.
+
// 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