OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 324 } |
325 | 325 |
326 // Check if we have a pending push stream for this url. | 326 // Check if we have a pending push stream for this url. |
327 PendingStreamMap::iterator it; | 327 PendingStreamMap::iterator it; |
328 it = pending_streams_.find(path); | 328 it = pending_streams_.find(path); |
329 if (it != pending_streams_.end()) { | 329 if (it != pending_streams_.end()) { |
330 // Server has advertised a stream, but not yet sent it. | 330 // Server has advertised a stream, but not yet sent it. |
331 DCHECK(!it->second); | 331 DCHECK(!it->second); |
332 // Server will assign a stream id when the push stream arrives. Use 0 for | 332 // Server will assign a stream id when the push stream arrives. Use 0 for |
333 // now. | 333 // now. |
334 log.AddEvent(NetLog::TYPE_SPDY_STREAM_ADOPTED_PUSH_STREAM); | 334 log.AddEvent(NetLog::TYPE_SPDY_STREAM_ADOPTED_PUSH_STREAM, NULL); |
335 SpdyStream* stream = new SpdyStream(this, 0, true, log); | 335 SpdyStream* stream = new SpdyStream(this, 0, true, log); |
336 stream->SetRequestInfo(request); | 336 stream->SetRequestInfo(request); |
337 stream->set_path(path); | 337 stream->set_path(path); |
338 it->second = stream; | 338 it->second = stream; |
339 return it->second; | 339 return it->second; |
340 } | 340 } |
341 | 341 |
342 const spdy::SpdyStreamId stream_id = GetNewStreamId(); | 342 const spdy::SpdyStreamId stream_id = GetNewStreamId(); |
343 | 343 |
344 // If we still don't have a stream, activate one now. | 344 // If we still don't have a stream, activate one now. |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 if (settings.empty()) | 1134 if (settings.empty()) |
1135 return; | 1135 return; |
1136 | 1136 |
1137 // Create the SETTINGS frame and send it. | 1137 // Create the SETTINGS frame and send it. |
1138 scoped_ptr<spdy::SpdySettingsControlFrame> settings_frame( | 1138 scoped_ptr<spdy::SpdySettingsControlFrame> settings_frame( |
1139 spdy_framer_.CreateSettings(settings)); | 1139 spdy_framer_.CreateSettings(settings)); |
1140 QueueFrame(settings_frame.get(), 0, NULL); | 1140 QueueFrame(settings_frame.get(), 0, NULL); |
1141 } | 1141 } |
1142 | 1142 |
1143 } // namespace net | 1143 } // namespace net |
OLD | NEW |