| 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 #include "net/socket/tcp_client_socket_pool.h" | 5 #include "net/socket/tcp_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "net/base/mock_host_resolver.h" | 10 #include "net/base/mock_host_resolver.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 virtual int GetPeerAddress(AddressList* address) const { | 46 virtual int GetPeerAddress(AddressList* address) const { |
| 47 return ERR_UNEXPECTED; | 47 return ERR_UNEXPECTED; |
| 48 } | 48 } |
| 49 virtual const BoundNetLog& NetLog() const { | 49 virtual const BoundNetLog& NetLog() const { |
| 50 return net_log_; | 50 return net_log_; |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual void SetSubresourceSpeculation() {} | 53 virtual void SetSubresourceSpeculation() {} |
| 54 virtual void SetOmniboxSpeculation() {} | 54 virtual void SetOmniboxSpeculation() {} |
| 55 virtual bool WasEverUsed() const { return false; } | 55 virtual bool WasEverUsed() const { return false; } |
| 56 virtual bool UsingTCPFastOpen() const { return false; } |
| 56 | 57 |
| 57 // Socket methods: | 58 // Socket methods: |
| 58 virtual int Read(IOBuffer* buf, int buf_len, | 59 virtual int Read(IOBuffer* buf, int buf_len, |
| 59 CompletionCallback* callback) { | 60 CompletionCallback* callback) { |
| 60 return ERR_FAILED; | 61 return ERR_FAILED; |
| 61 } | 62 } |
| 62 virtual int Write(IOBuffer* buf, int buf_len, | 63 virtual int Write(IOBuffer* buf, int buf_len, |
| 63 CompletionCallback* callback) { | 64 CompletionCallback* callback) { |
| 64 return ERR_FAILED; | 65 return ERR_FAILED; |
| 65 } | 66 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 91 virtual int GetPeerAddress(AddressList* address) const { | 92 virtual int GetPeerAddress(AddressList* address) const { |
| 92 return ERR_UNEXPECTED; | 93 return ERR_UNEXPECTED; |
| 93 } | 94 } |
| 94 virtual const BoundNetLog& NetLog() const { | 95 virtual const BoundNetLog& NetLog() const { |
| 95 return net_log_; | 96 return net_log_; |
| 96 } | 97 } |
| 97 | 98 |
| 98 virtual void SetSubresourceSpeculation() {} | 99 virtual void SetSubresourceSpeculation() {} |
| 99 virtual void SetOmniboxSpeculation() {} | 100 virtual void SetOmniboxSpeculation() {} |
| 100 virtual bool WasEverUsed() const { return false; } | 101 virtual bool WasEverUsed() const { return false; } |
| 102 virtual bool UsingTCPFastOpen() const { return false; } |
| 101 | 103 |
| 102 // Socket methods: | 104 // Socket methods: |
| 103 virtual int Read(IOBuffer* buf, int buf_len, | 105 virtual int Read(IOBuffer* buf, int buf_len, |
| 104 CompletionCallback* callback) { | 106 CompletionCallback* callback) { |
| 105 return ERR_FAILED; | 107 return ERR_FAILED; |
| 106 } | 108 } |
| 107 | 109 |
| 108 virtual int Write(IOBuffer* buf, int buf_len, | 110 virtual int Write(IOBuffer* buf, int buf_len, |
| 109 CompletionCallback* callback) { | 111 CompletionCallback* callback) { |
| 110 return ERR_FAILED; | 112 return ERR_FAILED; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 virtual int GetPeerAddress(AddressList* address) const{ | 151 virtual int GetPeerAddress(AddressList* address) const{ |
| 150 return ERR_UNEXPECTED; | 152 return ERR_UNEXPECTED; |
| 151 } | 153 } |
| 152 virtual const BoundNetLog& NetLog() const { | 154 virtual const BoundNetLog& NetLog() const { |
| 153 return net_log_; | 155 return net_log_; |
| 154 } | 156 } |
| 155 | 157 |
| 156 virtual void SetSubresourceSpeculation() {} | 158 virtual void SetSubresourceSpeculation() {} |
| 157 virtual void SetOmniboxSpeculation() {} | 159 virtual void SetOmniboxSpeculation() {} |
| 158 virtual bool WasEverUsed() const { return false; } | 160 virtual bool WasEverUsed() const { return false; } |
| 161 virtual bool UsingTCPFastOpen() const { return false; } |
| 159 | 162 |
| 160 // Socket methods: | 163 // Socket methods: |
| 161 virtual int Read(IOBuffer* buf, int buf_len, | 164 virtual int Read(IOBuffer* buf, int buf_len, |
| 162 CompletionCallback* callback) { | 165 CompletionCallback* callback) { |
| 163 return ERR_FAILED; | 166 return ERR_FAILED; |
| 164 } | 167 } |
| 165 | 168 |
| 166 virtual int Write(IOBuffer* buf, int buf_len, | 169 virtual int Write(IOBuffer* buf, int buf_len, |
| 167 CompletionCallback* callback) { | 170 CompletionCallback* callback) { |
| 168 return ERR_FAILED; | 171 return ERR_FAILED; |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 EXPECT_FALSE(handle.socket()); | 899 EXPECT_FALSE(handle.socket()); |
| 897 handle.Reset(); | 900 handle.Reset(); |
| 898 | 901 |
| 899 // Reset for the next case. | 902 // Reset for the next case. |
| 900 host_resolver_->set_synchronous_mode(false); | 903 host_resolver_->set_synchronous_mode(false); |
| 901 } | 904 } |
| 902 | 905 |
| 903 } // namespace | 906 } // namespace |
| 904 | 907 |
| 905 } // namespace net | 908 } // namespace net |
| OLD | NEW |