| 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 "net/spdy/spdy_stream_test_util.h" | 5 #include "net/spdy/spdy_stream_test_util.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 EXPECT_EQ( | 94 EXPECT_EQ( |
| 95 len, | 95 len, |
| 96 received_data_queue_.Dequeue(string_as_array(&received_data), len)); | 96 received_data_queue_.Dequeue(string_as_array(&received_data), len)); |
| 97 } | 97 } |
| 98 return received_data; | 98 return received_data; |
| 99 } | 99 } |
| 100 | 100 |
| 101 std::string StreamDelegateBase::GetResponseHeaderValue( | 101 std::string StreamDelegateBase::GetResponseHeaderValue( |
| 102 const std::string& name) const { | 102 const std::string& name) const { |
| 103 SpdyHeaderBlock::const_iterator it = response_headers_.find(name); | 103 SpdyHeaderBlock::const_iterator it = response_headers_.find(name); |
| 104 return (it == response_headers_.end()) ? std::string() : it->second; | 104 return (it == response_headers_.end()) ? std::string() |
| 105 : it->second.as_string(); |
| 105 } | 106 } |
| 106 | 107 |
| 107 StreamDelegateDoNothing::StreamDelegateDoNothing( | 108 StreamDelegateDoNothing::StreamDelegateDoNothing( |
| 108 const base::WeakPtr<SpdyStream>& stream) | 109 const base::WeakPtr<SpdyStream>& stream) |
| 109 : StreamDelegateBase(stream) {} | 110 : StreamDelegateBase(stream) {} |
| 110 | 111 |
| 111 StreamDelegateDoNothing::~StreamDelegateDoNothing() { | 112 StreamDelegateDoNothing::~StreamDelegateDoNothing() { |
| 112 } | 113 } |
| 113 | 114 |
| 114 StreamDelegateSendImmediate::StreamDelegateSendImmediate( | 115 StreamDelegateSendImmediate::StreamDelegateSendImmediate( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 SpdyResponseHeadersStatus | 157 SpdyResponseHeadersStatus |
| 157 StreamDelegateCloseOnHeaders::OnResponseHeadersUpdated( | 158 StreamDelegateCloseOnHeaders::OnResponseHeadersUpdated( |
| 158 const SpdyHeaderBlock& response_headers) { | 159 const SpdyHeaderBlock& response_headers) { |
| 159 stream()->Cancel(); | 160 stream()->Cancel(); |
| 160 return RESPONSE_HEADERS_ARE_COMPLETE; | 161 return RESPONSE_HEADERS_ARE_COMPLETE; |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace test | 164 } // namespace test |
| 164 | 165 |
| 165 } // namespace net | 166 } // namespace net |
| OLD | NEW |