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 "net/spdy/spdy_stream.h" | 5 #include "net/spdy/spdy_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // A wrapper around a stream that calls into ProduceSynStreamFrame(). | 56 // A wrapper around a stream that calls into ProduceSynStreamFrame(). |
57 class SpdyStream::SynStreamBufferProducer : public SpdyBufferProducer { | 57 class SpdyStream::SynStreamBufferProducer : public SpdyBufferProducer { |
58 public: | 58 public: |
59 SynStreamBufferProducer(const base::WeakPtr<SpdyStream>& stream) | 59 SynStreamBufferProducer(const base::WeakPtr<SpdyStream>& stream) |
60 : stream_(stream) { | 60 : stream_(stream) { |
61 DCHECK(stream_.get()); | 61 DCHECK(stream_.get()); |
62 } | 62 } |
63 | 63 |
64 virtual ~SynStreamBufferProducer() {} | 64 virtual ~SynStreamBufferProducer() {} |
65 | 65 |
66 virtual scoped_ptr<SpdyBuffer> ProduceBuffer() OVERRIDE { | 66 virtual scoped_ptr<SpdyBuffer> ProduceBuffer() override { |
67 if (!stream_.get()) { | 67 if (!stream_.get()) { |
68 NOTREACHED(); | 68 NOTREACHED(); |
69 return scoped_ptr<SpdyBuffer>(); | 69 return scoped_ptr<SpdyBuffer>(); |
70 } | 70 } |
71 DCHECK_GT(stream_->stream_id(), 0u); | 71 DCHECK_GT(stream_->stream_id(), 0u); |
72 return scoped_ptr<SpdyBuffer>( | 72 return scoped_ptr<SpdyBuffer>( |
73 new SpdyBuffer(stream_->ProduceSynStreamFrame())); | 73 new SpdyBuffer(stream_->ProduceSynStreamFrame())); |
74 } | 74 } |
75 | 75 |
76 private: | 76 private: |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 913 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
914 state); | 914 state); |
915 break; | 915 break; |
916 } | 916 } |
917 return description; | 917 return description; |
918 } | 918 } |
919 | 919 |
920 #undef STATE_CASE | 920 #undef STATE_CASE |
921 | 921 |
922 } // namespace net | 922 } // namespace net |
OLD | NEW |