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

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

Issue 1272283003: Add a new SpdyStream::Delegate method to handle trailers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add NOTREACHED Created 5 years, 4 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_proxy_client_socket.cc ('k') | net/spdy/spdy_stream.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 SpdyResponseHeadersStatus OnResponseHeadersUpdated( 69 SpdyResponseHeadersStatus OnResponseHeadersUpdated(
70 const SpdyHeaderBlock& response_headers) override { 70 const SpdyHeaderBlock& response_headers) override {
71 return RESPONSE_HEADERS_ARE_COMPLETE; 71 return RESPONSE_HEADERS_ARE_COMPLETE;
72 } 72 }
73 73
74 void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {} 74 void OnDataReceived(scoped_ptr<SpdyBuffer> buffer) override {}
75 75
76 void OnDataSent() override {} 76 void OnDataSent() override {}
77 77
78 void OnTrailers(const SpdyHeaderBlock& trailers) override {}
79
78 void OnClose(int status) override { 80 void OnClose(int status) override {
79 ignore_result(CreateFakeSpdySession(spdy_session_pool_, key_)); 81 ignore_result(CreateFakeSpdySession(spdy_session_pool_, key_));
80 } 82 }
81 83
82 private: 84 private:
83 SpdySessionPool* const spdy_session_pool_; 85 SpdySessionPool* const spdy_session_pool_;
84 const SpdySessionKey key_; 86 const SpdySessionKey key_;
85 }; 87 };
86 88
87 // Set up a SpdyStream to create a new session when it is closed. 89 // Set up a SpdyStream to create a new session when it is closed.
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 EXPECT_TRUE(delegateA.StreamIsClosed()); 614 EXPECT_TRUE(delegateA.StreamIsClosed());
613 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose()); 615 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateA.WaitForClose());
614 EXPECT_TRUE(delegateB.StreamIsClosed()); 616 EXPECT_TRUE(delegateB.StreamIsClosed());
615 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose()); 617 EXPECT_EQ(ERR_NETWORK_CHANGED, delegateB.WaitForClose());
616 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) 618 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
617 } 619 }
618 620
619 } // namespace 621 } // namespace
620 622
621 } // namespace net 623 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698