| 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 stream = it->second; | 960 stream = it->second; |
| 961 pending_streams_.erase(it); | 961 pending_streams_.erase(it); |
| 962 } | 962 } |
| 963 | 963 |
| 964 if (stream) { | 964 if (stream) { |
| 965 CHECK(stream->pushed()); | 965 CHECK(stream->pushed()); |
| 966 CHECK_EQ(0u, stream->stream_id()); | 966 CHECK_EQ(0u, stream->stream_id()); |
| 967 stream->set_stream_id(stream_id); | 967 stream->set_stream_id(stream_id); |
| 968 } else { | 968 } else { |
| 969 // TODO(mbelshe): can we figure out how to use a NetLog here? | 969 // TODO(mbelshe): can we figure out how to use a NetLog here? |
| 970 stream = new SpdyStream(this, stream_id, true, NULL); | 970 stream = new SpdyStream(this, stream_id, true, BoundNetLog()); |
| 971 | 971 |
| 972 // A new HttpResponseInfo object needs to be generated so the call to | 972 // A new HttpResponseInfo object needs to be generated so the call to |
| 973 // OnResponseReceived below has something to fill in. | 973 // OnResponseReceived below has something to fill in. |
| 974 // When a SpdyNetworkTransaction is created for this resource, the | 974 // When a SpdyNetworkTransaction is created for this resource, the |
| 975 // response_info is copied over and this version is destroyed. | 975 // response_info is copied over and this version is destroyed. |
| 976 // | 976 // |
| 977 // TODO(cbentzel): Minimize allocations and copies of HttpResponseInfo | 977 // TODO(cbentzel): Minimize allocations and copies of HttpResponseInfo |
| 978 // object. Should it just be part of SpdyStream? | 978 // object. Should it just be part of SpdyStream? |
| 979 HttpResponseInfo* response_info = new HttpResponseInfo(); | 979 HttpResponseInfo* response_info = new HttpResponseInfo(); |
| 980 stream->set_response_info_pointer(response_info); | 980 stream->set_response_info_pointer(response_info); |
| (...skipping 153 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 |