| OLD | NEW |
| 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 #include "jingle/glue/chrome_async_socket.h" | 5 #include "jingle/glue/chrome_async_socket.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 return; | 86 return; |
| 87 } | 87 } |
| 88 reads_.push_back(mock_read); | 88 reads_.push_back(mock_read); |
| 89 } | 89 } |
| 90 | 90 |
| 91 // Simply queues up the given write. | 91 // Simply queues up the given write. |
| 92 void AddWrite(const net::MockWrite& mock_write) { | 92 void AddWrite(const net::MockWrite& mock_write) { |
| 93 writes_.push_back(mock_write); | 93 writes_.push_back(mock_write); |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool AllReadDataConsumed() const override { | |
| 97 return reads_.empty(); | |
| 98 } | |
| 99 | |
| 100 bool AllWriteDataConsumed() const override { | |
| 101 return writes_.empty(); | |
| 102 } | |
| 103 | |
| 104 private: | 96 private: |
| 105 std::deque<net::MockRead> reads_; | 97 std::deque<net::MockRead> reads_; |
| 106 bool has_pending_read_; | 98 bool has_pending_read_; |
| 107 | 99 |
| 108 std::deque<net::MockWrite> writes_; | 100 std::deque<net::MockWrite> writes_; |
| 109 | 101 |
| 110 DISALLOW_COPY_AND_ASSIGN(AsyncSocketDataProvider); | 102 DISALLOW_COPY_AND_ASSIGN(AsyncSocketDataProvider); |
| 111 }; | 103 }; |
| 112 | 104 |
| 113 class MockXmppClientSocketFactory : public ResolvingClientSocketFactory { | 105 class MockXmppClientSocketFactory : public ResolvingClientSocketFactory { |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 message_loop_->RunUntilIdle(); | 1083 message_loop_->RunUntilIdle(); |
| 1092 | 1084 |
| 1093 ExpectNoSignal(); | 1085 ExpectNoSignal(); |
| 1094 | 1086 |
| 1095 DoSSLCloseOpenedNoError(); | 1087 DoSSLCloseOpenedNoError(); |
| 1096 } | 1088 } |
| 1097 | 1089 |
| 1098 } // namespace | 1090 } // namespace |
| 1099 | 1091 |
| 1100 } // namespace jingle_glue | 1092 } // namespace jingle_glue |
| OLD | NEW |