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

Unified Diff: chrome/browser/extensions/api/socket/tcp_socket.h

Issue 10310170: Improve socket.write() to make sure all data will be sent out. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix compile error on Mac Created 8 years, 7 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 | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/extensions/api/socket/tcp_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/socket/tcp_socket.h
diff --git a/chrome/browser/extensions/api/socket/tcp_socket.h b/chrome/browser/extensions/api/socket/tcp_socket.h
index 627ad46a293be7c22f31ce20131fc378c7bd740a..08c1f193b26b0e21bf5e919ce4baa1c275109975 100644
--- a/chrome/browser/extensions/api/socket/tcp_socket.h
+++ b/chrome/browser/extensions/api/socket/tcp_socket.h
@@ -34,9 +34,6 @@ class TCPSocket : public Socket {
virtual int Bind(const std::string& address, int port) OVERRIDE;
virtual void Read(int count,
const ReadCompletionCallback& callback) OVERRIDE;
- virtual void Write(scoped_refptr<net::IOBuffer> io_buffer,
- int bytes,
- const CompletionCallback& callback) OVERRIDE;
virtual void RecvFrom(int count,
const RecvFromCompletionCallback& callback) OVERRIDE;
virtual void SendTo(scoped_refptr<net::IOBuffer> io_buffer,
@@ -49,11 +46,15 @@ class TCPSocket : public Socket {
net::TCPClientSocket* tcp_client_socket,
APIResourceEventNotifier* event_notifier);
+ protected:
+ virtual int WriteImpl(net::IOBuffer* io_buffer,
+ int io_buffer_size,
+ const net::CompletionCallback& callback) OVERRIDE;
+
private:
- virtual void OnConnectComplete(int result);
- virtual void OnReadComplete(scoped_refptr<net::IOBuffer> io_buffer,
- int result);
- virtual void OnWriteComplete(int result);
+ void OnConnectComplete(int result);
+ void OnReadComplete(scoped_refptr<net::IOBuffer> io_buffer,
+ int result);
TCPSocket(net::TCPClientSocket* tcp_client_socket,
APIResourceEventNotifier* event_notifier);
@@ -63,8 +64,6 @@ class TCPSocket : public Socket {
CompletionCallback connect_callback_;
ReadCompletionCallback read_callback_;
-
- CompletionCallback write_callback_;
};
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/extensions/api/socket/tcp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698