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

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

Issue 10836084: SPDY - Handle incomplete headers during server push. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_session_spdy3_unittest.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_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "net/base/host_cache.h" 7 #include "net/base/host_cache.h"
8 #include "net/base/ip_endpoint.h" 8 #include "net/base/ip_endpoint.h"
9 #include "net/base/net_log_unittest.h" 9 #include "net/base/net_log_unittest.h"
10 #include "net/spdy/spdy_io_buffer.h" 10 #include "net/spdy/spdy_io_buffer.h"
(...skipping 25 matching lines...) Expand all
36 return OK; 36 return OK;
37 } 37 }
38 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE { 38 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE {
39 return OK; 39 return OK;
40 } 40 }
41 virtual int OnResponseReceived(const SpdyHeaderBlock& response, 41 virtual int OnResponseReceived(const SpdyHeaderBlock& response,
42 base::Time response_time, 42 base::Time response_time,
43 int status) OVERRIDE { 43 int status) OVERRIDE {
44 return OK; 44 return OK;
45 } 45 }
46 virtual void OnDataReceived(const char* data, int length) OVERRIDE {} 46 virtual int OnDataReceived(const char* data, int length) OVERRIDE {
47 return OK;
48 }
47 virtual void OnDataSent(int length) OVERRIDE {} 49 virtual void OnDataSent(int length) OVERRIDE {}
48 virtual void OnClose(int status) OVERRIDE { 50 virtual void OnClose(int status) OVERRIDE {
49 stream_->Close(); 51 stream_->Close();
50 } 52 }
51 private: 53 private:
52 SpdyStream* stream_; 54 SpdyStream* stream_;
53 }; 55 };
54 56
55 } // namespace 57 } // namespace
56 58
(...skipping 24 matching lines...) Expand all
81 virtual int OnSendBodyComplete(int /*status*/, bool* /*eof*/) { 83 virtual int OnSendBodyComplete(int /*status*/, bool* /*eof*/) {
82 return ERR_UNEXPECTED; 84 return ERR_UNEXPECTED;
83 } 85 }
84 86
85 virtual int OnResponseReceived(const SpdyHeaderBlock& response, 87 virtual int OnResponseReceived(const SpdyHeaderBlock& response,
86 base::Time response_time, 88 base::Time response_time,
87 int status) { 89 int status) {
88 return status; 90 return status;
89 } 91 }
90 92
91 virtual void OnDataReceived(const char* buffer, int bytes) { 93 virtual int OnDataReceived(const char* buffer, int bytes) {
94 return OK;
92 } 95 }
93 96
94 virtual void OnDataSent(int length) { 97 virtual void OnDataSent(int length) {
95 } 98 }
96 99
97 virtual void OnClose(int status) { 100 virtual void OnClose(int status) {
98 CompletionCallback callback = callback_; 101 CompletionCallback callback = callback_;
99 callback_.Reset(); 102 callback_.Reset();
100 callback.Run(OK); 103 callback.Run(OK);
101 } 104 }
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 session->CloseSessionOnError(ERR_ABORTED, true, ""); 1514 session->CloseSessionOnError(ERR_ABORTED, true, "");
1512 1515
1513 EXPECT_TRUE(spdy_stream1->closed()); 1516 EXPECT_TRUE(spdy_stream1->closed());
1514 EXPECT_TRUE(spdy_stream2->closed()); 1517 EXPECT_TRUE(spdy_stream2->closed());
1515 1518
1516 spdy_stream1 = NULL; 1519 spdy_stream1 = NULL;
1517 spdy_stream2 = NULL; 1520 spdy_stream2 = NULL;
1518 } 1521 }
1519 1522
1520 } // namespace net 1523 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698