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

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

Issue 2783683002: Log source_dependency in HTTP2_SESSION_SEND_HEADERS. (Closed)
Patch Set: Fix use-after-free. Created 3 years, 8 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.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
11 #include <deque> 11 #include <deque>
12 #include <map> 12 #include <map>
13 #include <memory> 13 #include <memory>
14 #include <set> 14 #include <set>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/gtest_prod_util.h" 18 #include "base/gtest_prod_util.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "net/base/host_port_pair.h" 23 #include "net/base/host_port_pair.h"
24 #include "net/base/io_buffer.h" 24 #include "net/base/io_buffer.h"
25 #include "net/base/load_states.h" 25 #include "net/base/load_states.h"
26 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
27 #include "net/base/net_export.h" 27 #include "net/base/net_export.h"
28 #include "net/base/request_priority.h" 28 #include "net/base/request_priority.h"
29 #include "net/log/net_log_source.h"
29 #include "net/socket/client_socket_handle.h" 30 #include "net/socket/client_socket_handle.h"
30 #include "net/socket/client_socket_pool.h" 31 #include "net/socket/client_socket_pool.h"
31 #include "net/socket/next_proto.h" 32 #include "net/socket/next_proto.h"
32 #include "net/socket/ssl_client_socket.h" 33 #include "net/socket/ssl_client_socket.h"
33 #include "net/socket/stream_socket.h" 34 #include "net/socket/stream_socket.h"
34 #include "net/spdy/buffered_spdy_framer.h" 35 #include "net/spdy/buffered_spdy_framer.h"
35 #include "net/spdy/http2_priority_dependencies.h" 36 #include "net/spdy/http2_priority_dependencies.h"
36 #include "net/spdy/multiplexed_session.h" 37 #include "net/spdy/multiplexed_session.h"
37 #include "net/spdy/platform/api/spdy_string_piece.h" 38 #include "net/spdy/platform/api/spdy_string_piece.h"
38 #include "net/spdy/server_push_delegate.h" 39 #include "net/spdy/server_push_delegate.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 bool VerifyDomainAuthentication(const std::string& domain); 371 bool VerifyDomainAuthentication(const std::string& domain);
371 372
372 // Pushes the given producer into the write queue for 373 // Pushes the given producer into the write queue for
373 // |stream|. |stream| is guaranteed to be activated before the 374 // |stream|. |stream| is guaranteed to be activated before the
374 // producer is used to produce its frame. 375 // producer is used to produce its frame.
375 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream, 376 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream,
376 SpdyFrameType frame_type, 377 SpdyFrameType frame_type,
377 std::unique_ptr<SpdyBufferProducer> producer); 378 std::unique_ptr<SpdyBufferProducer> producer);
378 379
379 // Creates and returns a HEADERS frame for |stream_id|. 380 // Creates and returns a HEADERS frame for |stream_id|.
380 std::unique_ptr<SpdySerializedFrame> CreateHeaders(SpdyStreamId stream_id, 381 std::unique_ptr<SpdySerializedFrame> CreateHeaders(
381 RequestPriority priority, 382 SpdyStreamId stream_id,
382 SpdyControlFlags flags, 383 RequestPriority priority,
383 SpdyHeaderBlock headers); 384 SpdyControlFlags flags,
385 SpdyHeaderBlock headers,
386 NetLogSource source_dependency);
384 387
385 // Creates and returns a SpdyBuffer holding a data frame with the 388 // Creates and returns a SpdyBuffer holding a data frame with the
386 // given data. May return NULL if stalled by flow control. 389 // given data. May return NULL if stalled by flow control.
387 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id, 390 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id,
388 IOBuffer* data, 391 IOBuffer* data,
389 int len, 392 int len,
390 SpdyDataFlags flags); 393 SpdyDataFlags flags);
391 394
392 // Close the stream with the given ID, which must exist and be 395 // Close the stream with the given ID, which must exist and be
393 // active. Note that that stream may hold the last reference to the 396 // active. Note that that stream may hold the last reference to the
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 // Used for posting asynchronous IO tasks. We use this even though 1227 // Used for posting asynchronous IO tasks. We use this even though
1225 // SpdySession is refcounted because we don't need to keep the SpdySession 1228 // SpdySession is refcounted because we don't need to keep the SpdySession
1226 // alive if the last reference is within a RunnableMethod. Just revoke the 1229 // alive if the last reference is within a RunnableMethod. Just revoke the
1227 // method. 1230 // method.
1228 base::WeakPtrFactory<SpdySession> weak_factory_; 1231 base::WeakPtrFactory<SpdySession> weak_factory_;
1229 }; 1232 };
1230 1233
1231 } // namespace net 1234 } // namespace net
1232 1235
1233 #endif // NET_SPDY_SPDY_SESSION_H_ 1236 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698