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

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

Issue 2526003002: Disallow multiple HEADERS frames on pushed streams. (Closed)
Patch Set: Rename enum, enum entry, and member. Created 4 years 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_session.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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // A delegate that opens a new session when it is closed. 66 // A delegate that opens a new session when it is closed.
67 class SessionOpeningDelegate : public SpdyStream::Delegate { 67 class SessionOpeningDelegate : public SpdyStream::Delegate {
68 public: 68 public:
69 SessionOpeningDelegate(SpdySessionPool* spdy_session_pool, 69 SessionOpeningDelegate(SpdySessionPool* spdy_session_pool,
70 const SpdySessionKey& key) 70 const SpdySessionKey& key)
71 : spdy_session_pool_(spdy_session_pool), 71 : spdy_session_pool_(spdy_session_pool),
72 key_(key) {} 72 key_(key) {}
73 73
74 ~SessionOpeningDelegate() override {} 74 ~SessionOpeningDelegate() override {}
75 75
76 void OnRequestHeadersSent() override {} 76 void OnHeadersSent() override {}
77 77
78 SpdyResponseHeadersStatus OnResponseHeadersUpdated( 78 void OnHeadersReceived(const SpdyHeaderBlock& response_headers) override {}
79 const SpdyHeaderBlock& response_headers) override {
80 return RESPONSE_HEADERS_ARE_COMPLETE;
81 }
82 79
83 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override {} 80 void OnDataReceived(std::unique_ptr<SpdyBuffer> buffer) override {}
84 81
85 void OnDataSent() override {} 82 void OnDataSent() override {}
86 83
87 void OnTrailers(const SpdyHeaderBlock& trailers) override {} 84 void OnTrailers(const SpdyHeaderBlock& trailers) override {}
88 85
89 void OnClose(int status) override { 86 void OnClose(int status) override {
90 ignore_result(CreateFakeSpdySession(spdy_session_pool_, key_)); 87 ignore_result(CreateFakeSpdySession(spdy_session_pool_, key_));
91 } 88 }
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // there is no pushed stream on any sessions owned by |spdy_session_pool_|. 662 // there is no pushed stream on any sessions owned by |spdy_session_pool_|.
666 base::WeakPtr<SpdySession> session2 = 663 base::WeakPtr<SpdySession> session2 =
667 spdy_session_pool_->FindAvailableSession( 664 spdy_session_pool_->FindAvailableSession(
668 key, GURL("http://news.example.org/foo.html"), NetLogWithSource()); 665 key, GURL("http://news.example.org/foo.html"), NetLogWithSource());
669 EXPECT_EQ(session.get(), session2.get()); 666 EXPECT_EQ(session.get(), session2.get());
670 667
671 spdy_session_pool_->CloseCurrentSessions(ERR_ABORTED); 668 spdy_session_pool_->CloseCurrentSessions(ERR_ABORTED);
672 } 669 }
673 670
674 } // namespace net 671 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698