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

Side by Side Diff: net/spdy/spdy_stream_test_util.cc

Issue 1357953002: Replace the existing SpdyHeaderBlock typedef with a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add NET_EXPORT to fix compile error on win_chromium_compile_dbg_ng. Created 5 years, 2 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
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698