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

Unified Diff: remoting/protocol/buffered_socket_writer.h

Issue 10066042: Refcounted types should not have public destructors, remoting/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Few fixes Created 8 years, 8 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 | « remoting/host/screen_recorder.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/buffered_socket_writer.h
diff --git a/remoting/protocol/buffered_socket_writer.h b/remoting/protocol/buffered_socket_writer.h
index 7bc1b09e3aa628a85a7545737fc5500288399dc4..53eb08f06e9a0ca6a7db58956e2a6bb8ecb6c541 100644
--- a/remoting/protocol/buffered_socket_writer.h
+++ b/remoting/protocol/buffered_socket_writer.h
@@ -39,7 +39,6 @@ class BufferedSocketWriterBase
typedef base::Callback<void(int)> WriteFailedCallback;
explicit BufferedSocketWriterBase(base::MessageLoopProxy* message_loop);
- virtual ~BufferedSocketWriterBase();
// Initializes the writer. Must be called on the thread that will be used
// to access the socket in the future. |callback| will be called after each
@@ -64,9 +63,13 @@ class BufferedSocketWriterBase
void Close();
protected:
+ friend class base::RefCountedThreadSafe<BufferedSocketWriterBase>;
+
class PendingPacket;
typedef std::list<PendingPacket*> DataQueue;
+ virtual ~BufferedSocketWriterBase();
+
DataQueue queue_;
int buffer_size_;
@@ -105,7 +108,6 @@ class BufferedSocketWriterBase
class BufferedSocketWriter : public BufferedSocketWriterBase {
public:
explicit BufferedSocketWriter(base::MessageLoopProxy* message_loop);
- virtual ~BufferedSocketWriter();
protected:
virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE;
@@ -113,18 +115,22 @@ class BufferedSocketWriter : public BufferedSocketWriterBase {
virtual void OnError_Locked(int result) OVERRIDE;
private:
+ virtual ~BufferedSocketWriter();
+
scoped_refptr<net::DrainableIOBuffer> current_buf_;
};
class BufferedDatagramWriter : public BufferedSocketWriterBase {
public:
explicit BufferedDatagramWriter(base::MessageLoopProxy* message_loop);
- virtual ~BufferedDatagramWriter();
protected:
virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE;
virtual void AdvanceBufferPosition_Locked(int written) OVERRIDE;
virtual void OnError_Locked(int result) OVERRIDE;
+
+ private:
+ virtual ~BufferedDatagramWriter();
};
} // namespace protocol
« no previous file with comments | « remoting/host/screen_recorder.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698