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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
6 #include "net/base/completion_callback.h" | 6 #include "net/base/completion_callback.h" |
7 #include "net/base/net_log_unittest.h" | 7 #include "net/base/net_log_unittest.h" |
8 #include "net/spdy/buffered_spdy_framer.h" | 8 #include "net/spdy/buffered_spdy_framer.h" |
9 #include "net/spdy/spdy_stream.h" | 9 #include "net/spdy/spdy_stream.h" |
10 #include "net/spdy/spdy_http_utils.h" | 10 #include "net/spdy/spdy_http_utils.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 64 } |
65 virtual void OnDataSent(int length) { | 65 virtual void OnDataSent(int length) { |
66 data_sent_ += length; | 66 data_sent_ += length; |
67 } | 67 } |
68 virtual void OnClose(int status) { | 68 virtual void OnClose(int status) { |
69 closed_ = true; | 69 closed_ = true; |
70 CompletionCallback callback = callback_; | 70 CompletionCallback callback = callback_; |
71 callback_.Reset(); | 71 callback_.Reset(); |
72 callback.Run(OK); | 72 callback.Run(OK); |
73 } | 73 } |
74 virtual void set_chunk_callback(net::ChunkCallback *) {} | |
75 | |
76 bool send_headers_completed() const { return send_headers_completed_; } | 74 bool send_headers_completed() const { return send_headers_completed_; } |
77 const linked_ptr<SpdyHeaderBlock>& response() const { | 75 const linked_ptr<SpdyHeaderBlock>& response() const { |
78 return response_; | 76 return response_; |
79 } | 77 } |
80 const std::string& received_data() const { return received_data_; } | 78 const std::string& received_data() const { return received_data_; } |
81 int data_sent() const { return data_sent_; } | 79 int data_sent() const { return data_sent_; } |
82 bool closed() const { return closed_; } | 80 bool closed() const { return closed_; } |
83 | 81 |
84 private: | 82 private: |
85 SpdyStream* stream_; | 83 SpdyStream* stream_; |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 entries, 0, | 427 entries, 0, |
430 net::NetLog::TYPE_SPDY_STREAM_ERROR, | 428 net::NetLog::TYPE_SPDY_STREAM_ERROR, |
431 net::NetLog::PHASE_NONE); | 429 net::NetLog::PHASE_NONE); |
432 | 430 |
433 int stream_id2; | 431 int stream_id2; |
434 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); | 432 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); |
435 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); | 433 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); |
436 } | 434 } |
437 | 435 |
438 } // namespace net | 436 } // namespace net |
OLD | NEW |