Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ | 5 #ifndef REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ |
| 6 #define REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ | 6 #define REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/lock.h" | 10 #include "base/lock.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 void OnWritten(int result); | 83 void OnWritten(int result); |
| 84 | 84 |
| 85 // This method is called when an error is encountered. | 85 // This method is called when an error is encountered. |
| 86 void HandleError(int result); | 86 void HandleError(int result); |
| 87 | 87 |
| 88 // Must be locked when accessing |socket_|, |queue_| and |buffer_size_|; | 88 // Must be locked when accessing |socket_|, |queue_| and |buffer_size_|; |
| 89 Lock lock_; | 89 Lock lock_; |
| 90 | 90 |
| 91 net::Socket* socket_; | 91 net::Socket* socket_; |
| 92 MessageLoop* message_loop_; | 92 MessageLoop* message_loop_; |
| 93 scoped_ptr<WriteFailedCallback> write_failed_callback_; | |
|
Sergey Ulanov
2011/01/20 20:56:26
After looking at this again: This is supposed to b
Alpha Left Google
2011/01/20 22:48:47
Removed from this patch.
| |
| 94 | 93 |
| 95 bool write_pending_; | 94 bool write_pending_; |
| 96 | 95 |
| 97 net::CompletionCallbackImpl<BufferedSocketWriterBase> written_callback_; | 96 net::CompletionCallbackImpl<BufferedSocketWriterBase> written_callback_; |
| 98 | 97 |
| 99 bool closed_; | 98 bool closed_; |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 class BufferedSocketWriter : public BufferedSocketWriterBase { | 101 class BufferedSocketWriter : public BufferedSocketWriterBase { |
| 103 public: | 102 public: |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 121 protected: | 120 protected: |
| 122 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size); | 121 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size); |
| 123 virtual void AdvanceBufferPosition_Locked(int written); | 122 virtual void AdvanceBufferPosition_Locked(int written); |
| 124 virtual void OnError_Locked(int result); | 123 virtual void OnError_Locked(int result); |
| 125 }; | 124 }; |
| 126 | 125 |
| 127 } // namespace protocol | 126 } // namespace protocol |
| 128 } // namespace remoting | 127 } // namespace remoting |
| 129 | 128 |
| 130 #endif // REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ | 129 #endif // REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ |
| OLD | NEW |