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

Side by Side Diff: jingle/glue/fake_ssl_client_socket.h

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This StreamSocket implementation is to be used with servers that 5 // This StreamSocket implementation is to be used with servers that
6 // accept connections on port 443 but don't really use SSL. For 6 // accept connections on port 443 but don't really use SSL. For
7 // example, the Google Talk servers do this to bypass proxies. (The 7 // example, the Google Talk servers do this to bypass proxies. (The
8 // connection is upgraded to TLS as part of the XMPP negotiation, so 8 // connection is upgraded to TLS as part of the XMPP negotiation, so
9 // security is preserved.) A "fake" SSL handshake is done immediately 9 // security is preserved.) A "fake" SSL handshake is done immediately
10 // after connection to fool proxies into thinking that this is a real 10 // after connection to fool proxies into thinking that this is a real
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Exposed for testing. 43 // Exposed for testing.
44 static base::StringPiece GetSslClientHello(); 44 static base::StringPiece GetSslClientHello();
45 static base::StringPiece GetSslServerHello(); 45 static base::StringPiece GetSslServerHello();
46 46
47 // net::StreamSocket implementation. 47 // net::StreamSocket implementation.
48 virtual int Read(net::IOBuffer* buf, int buf_len, 48 virtual int Read(net::IOBuffer* buf, int buf_len,
49 const net::CompletionCallback& callback) OVERRIDE; 49 const net::CompletionCallback& callback) OVERRIDE;
50 virtual int Write(net::IOBuffer* buf, int buf_len, 50 virtual int Write(net::IOBuffer* buf, int buf_len,
51 const net::CompletionCallback& callback) OVERRIDE; 51 const net::CompletionCallback& callback) OVERRIDE;
52 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 52 virtual int SetReceiveBufferSize(int32 size) OVERRIDE;
53 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 53 virtual int SetSendBufferSize(int32 size) OVERRIDE;
54 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; 54 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE;
55 virtual void Disconnect() OVERRIDE; 55 virtual void Disconnect() OVERRIDE;
56 virtual bool IsConnected() const OVERRIDE; 56 virtual bool IsConnected() const OVERRIDE;
57 virtual bool IsConnectedAndIdle() const OVERRIDE; 57 virtual bool IsConnectedAndIdle() const OVERRIDE;
58 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE; 58 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE;
59 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE; 59 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE;
60 virtual const net::BoundNetLog& NetLog() const OVERRIDE; 60 virtual const net::BoundNetLog& NetLog() const OVERRIDE;
61 virtual void SetSubresourceSpeculation() OVERRIDE; 61 virtual void SetSubresourceSpeculation() OVERRIDE;
62 virtual void SetOmniboxSpeculation() OVERRIDE; 62 virtual void SetOmniboxSpeculation() OVERRIDE;
63 virtual bool WasEverUsed() const OVERRIDE; 63 virtual bool WasEverUsed() const OVERRIDE;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // The callback passed to Connect(). 102 // The callback passed to Connect().
103 net::CompletionCallback user_connect_callback_; 103 net::CompletionCallback user_connect_callback_;
104 104
105 scoped_refptr<net::DrainableIOBuffer> write_buf_; 105 scoped_refptr<net::DrainableIOBuffer> write_buf_;
106 scoped_refptr<net::DrainableIOBuffer> read_buf_; 106 scoped_refptr<net::DrainableIOBuffer> read_buf_;
107 }; 107 };
108 108
109 } // namespace jingle_glue 109 } // namespace jingle_glue
110 110
111 #endif // JINGLE_GLUE_FAKE_SSL_CLIENT_SOCKET_H_ 111 #endif // JINGLE_GLUE_FAKE_SSL_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698