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/linked_ptr.h" | 8 #include "base/linked_ptr.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 // TODO(erikchen): Actually do something with the associated id. | 1047 // TODO(erikchen): Actually do something with the associated id. |
1048 | 1048 |
1049 // There should not be an existing pushed stream with the same path. | 1049 // There should not be an existing pushed stream with the same path. |
1050 PushedStreamMap::iterator it = unclaimed_pushed_streams_.find(path); | 1050 PushedStreamMap::iterator it = unclaimed_pushed_streams_.find(path); |
1051 if (it != unclaimed_pushed_streams_.end()) { | 1051 if (it != unclaimed_pushed_streams_.end()) { |
1052 LOG(ERROR) << "Received duplicate pushed stream with path: " << path; | 1052 LOG(ERROR) << "Received duplicate pushed stream with path: " << path; |
1053 ResetStream(stream_id, spdy::PROTOCOL_ERROR); | 1053 ResetStream(stream_id, spdy::PROTOCOL_ERROR); |
1054 return; | 1054 return; |
1055 } | 1055 } |
1056 | 1056 |
1057 scoped_refptr<SpdyStream> stream = | 1057 scoped_refptr<SpdyStream> stream( |
1058 new SpdyStream(this, stream_id, true, net_log_); | 1058 new SpdyStream(this, stream_id, true, net_log_)); |
1059 | 1059 |
1060 stream->set_path(path); | 1060 stream->set_path(path); |
1061 | 1061 |
1062 unclaimed_pushed_streams_[path] = stream; | 1062 unclaimed_pushed_streams_[path] = stream; |
1063 | 1063 |
1064 ActivateStream(stream); | 1064 ActivateStream(stream); |
1065 stream->set_response_received(); | 1065 stream->set_response_received(); |
1066 | 1066 |
1067 // Parse the headers. | 1067 // Parse the headers. |
1068 if (!Respond(*headers, stream)) | 1068 if (!Respond(*headers, stream)) |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 } | 1337 } |
1338 } | 1338 } |
1339 } | 1339 } |
1340 | 1340 |
1341 void SpdySession::InvokeUserStreamCreationCallback( | 1341 void SpdySession::InvokeUserStreamCreationCallback( |
1342 CompletionCallback* callback, int rv) { | 1342 CompletionCallback* callback, int rv) { |
1343 callback->Run(rv); | 1343 callback->Run(rv); |
1344 } | 1344 } |
1345 | 1345 |
1346 } // namespace net | 1346 } // namespace net |
OLD | NEW |