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

Side by Side Diff: net/spdy/spdy_stream.cc

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_stream.h ('k') | net/spdy/spdy_stream_test_util.h » ('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 #include "net/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 std::unique_ptr<SpdySerializedFrame> SpdyStream::ProduceHeadersFrame() { 224 std::unique_ptr<SpdySerializedFrame> SpdyStream::ProduceHeadersFrame() {
225 CHECK_EQ(io_state_, STATE_IDLE); 225 CHECK_EQ(io_state_, STATE_IDLE);
226 CHECK(request_headers_valid_); 226 CHECK(request_headers_valid_);
227 CHECK_GT(stream_id_, 0u); 227 CHECK_GT(stream_id_, 0u);
228 228
229 SpdyControlFlags flags = 229 SpdyControlFlags flags =
230 (pending_send_status_ == NO_MORE_DATA_TO_SEND) ? 230 (pending_send_status_ == NO_MORE_DATA_TO_SEND) ?
231 CONTROL_FLAG_FIN : CONTROL_FLAG_NONE; 231 CONTROL_FLAG_FIN : CONTROL_FLAG_NONE;
232 std::unique_ptr<SpdySerializedFrame> frame(session_->CreateHeaders( 232 std::unique_ptr<SpdySerializedFrame> frame(session_->CreateHeaders(
233 stream_id_, priority_, flags, std::move(request_headers_))); 233 stream_id_, priority_, flags, std::move(request_headers_),
234 delegate_->source_dependency()));
234 request_headers_valid_ = false; 235 request_headers_valid_ = false;
235 send_time_ = base::TimeTicks::Now(); 236 send_time_ = base::TimeTicks::Now();
236 return frame; 237 return frame;
237 } 238 }
238 239
239 void SpdyStream::DetachDelegate() { 240 void SpdyStream::DetachDelegate() {
240 DCHECK(!IsClosed()); 241 DCHECK(!IsClosed());
241 delegate_ = NULL; 242 delegate_ = NULL;
242 Cancel(); 243 Cancel();
243 } 244 }
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 954 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
954 state); 955 state);
955 break; 956 break;
956 } 957 }
957 return description; 958 return description;
958 } 959 }
959 960
960 #undef STATE_CASE 961 #undef STATE_CASE
961 962
962 } // namespace net 963 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698