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

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

Issue 2096713002: Reduce SpdyHeaderBlock copies with move semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clear() does not work after all. Created 4 years, 6 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session.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 #ifndef NET_SPDY_SPDY_SESSION_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_H_
6 #define NET_SPDY_SPDY_SESSION_H_ 6 #define NET_SPDY_SPDY_SESSION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 bool VerifyDomainAuthentication(const std::string& domain); 365 bool VerifyDomainAuthentication(const std::string& domain);
366 366
367 // Pushes the given producer into the write queue for 367 // Pushes the given producer into the write queue for
368 // |stream|. |stream| is guaranteed to be activated before the 368 // |stream|. |stream| is guaranteed to be activated before the
369 // producer is used to produce its frame. 369 // producer is used to produce its frame.
370 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream, 370 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream,
371 SpdyFrameType frame_type, 371 SpdyFrameType frame_type,
372 std::unique_ptr<SpdyBufferProducer> producer); 372 std::unique_ptr<SpdyBufferProducer> producer);
373 373
374 // Creates and returns a SYN frame for |stream_id|. 374 // Creates and returns a SYN frame for |stream_id|.
375 std::unique_ptr<SpdySerializedFrame> CreateSynStream( 375 std::unique_ptr<SpdySerializedFrame> CreateSynStream(SpdyStreamId stream_id,
376 SpdyStreamId stream_id, 376 RequestPriority priority,
377 RequestPriority priority, 377 SpdyControlFlags flags,
378 SpdyControlFlags flags, 378 SpdyHeaderBlock headers);
379 const SpdyHeaderBlock& headers);
380 379
381 // Creates and returns a SpdyBuffer holding a data frame with the 380 // Creates and returns a SpdyBuffer holding a data frame with the
382 // given data. May return NULL if stalled by flow control. 381 // given data. May return NULL if stalled by flow control.
383 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id, 382 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id,
384 IOBuffer* data, 383 IOBuffer* data,
385 int len, 384 int len,
386 SpdyDataFlags flags); 385 SpdyDataFlags flags);
387 386
388 // Close the stream with the given ID, which must exist and be 387 // Close the stream with the given ID, which must exist and be
389 // active. Note that that stream may hold the last reference to the 388 // active. Note that that stream may hold the last reference to the
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 // Used for posting asynchronous IO tasks. We use this even though 1235 // Used for posting asynchronous IO tasks. We use this even though
1237 // SpdySession is refcounted because we don't need to keep the SpdySession 1236 // SpdySession is refcounted because we don't need to keep the SpdySession
1238 // alive if the last reference is within a RunnableMethod. Just revoke the 1237 // alive if the last reference is within a RunnableMethod. Just revoke the
1239 // method. 1238 // method.
1240 base::WeakPtrFactory<SpdySession> weak_factory_; 1239 base::WeakPtrFactory<SpdySession> weak_factory_;
1241 }; 1240 };
1242 1241
1243 } // namespace net 1242 } // namespace net
1244 1243
1245 #endif // NET_SPDY_SPDY_SESSION_H_ 1244 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698