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

Side by Side Diff: net/spdy/bidirectional_stream_spdy_impl.h

Issue 1969893002: Remove unnecessary array allocation in cronet_bidirectional_stream_adapter.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add include vector Created 4 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 5 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
14 #include "net/http/bidirectional_stream_impl.h" 16 #include "net/http/bidirectional_stream_impl.h"
15 #include "net/http/bidirectional_stream_request_info.h" 17 #include "net/http/bidirectional_stream_request_info.h"
16 #include "net/http/http_request_info.h" 18 #include "net/http/http_request_info.h"
17 #include "net/spdy/spdy_read_queue.h" 19 #include "net/spdy/spdy_read_queue.h"
18 #include "net/spdy/spdy_session.h" 20 #include "net/spdy/spdy_session.h"
19 #include "net/spdy/spdy_stream.h" 21 #include "net/spdy/spdy_stream.h"
20 22
21 namespace base { 23 namespace base {
22 class Timer; 24 class Timer;
(...skipping 14 matching lines...) Expand all
37 39
38 ~BidirectionalStreamSpdyImpl() override; 40 ~BidirectionalStreamSpdyImpl() override;
39 41
40 // BidirectionalStreamImpl implementation: 42 // BidirectionalStreamImpl implementation:
41 void Start(const BidirectionalStreamRequestInfo* request_info, 43 void Start(const BidirectionalStreamRequestInfo* request_info,
42 const BoundNetLog& net_log, 44 const BoundNetLog& net_log,
43 bool disable_auto_flush, 45 bool disable_auto_flush,
44 BidirectionalStreamImpl::Delegate* delegate, 46 BidirectionalStreamImpl::Delegate* delegate,
45 std::unique_ptr<base::Timer> timer) override; 47 std::unique_ptr<base::Timer> timer) override;
46 int ReadData(IOBuffer* buf, int buf_len) override; 48 int ReadData(IOBuffer* buf, int buf_len) override;
47 void SendData(IOBuffer* data, int length, bool end_stream) override; 49 void SendData(const scoped_refptr<IOBuffer>& data,
48 void SendvData(const std::vector<IOBuffer*>& buffers, 50 int length,
51 bool end_stream) override;
52 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
49 const std::vector<int>& lengths, 53 const std::vector<int>& lengths,
50 bool end_stream) override; 54 bool end_stream) override;
51 void Cancel() override; 55 void Cancel() override;
52 NextProto GetProtocol() const override; 56 NextProto GetProtocol() const override;
53 int64_t GetTotalReceivedBytes() const override; 57 int64_t GetTotalReceivedBytes() const override;
54 int64_t GetTotalSentBytes() const override; 58 int64_t GetTotalSentBytes() const override;
55 59
56 // SpdyStream::Delegate implementation: 60 // SpdyStream::Delegate implementation:
57 void OnRequestHeadersSent() override; 61 void OnRequestHeadersSent() override;
58 SpdyResponseHeadersStatus OnResponseHeadersUpdated( 62 SpdyResponseHeadersStatus OnResponseHeadersUpdated(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 scoped_refptr<IOBuffer> pending_combined_buffer_; 107 scoped_refptr<IOBuffer> pending_combined_buffer_;
104 108
105 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; 109 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_;
106 110
107 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); 111 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl);
108 }; 112 };
109 113
110 } // namespace net 114 } // namespace net
111 115
112 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 116 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_stream_test.cc ('k') | net/spdy/bidirectional_stream_spdy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698