| OLD | NEW |
| 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_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include "net/base/host_cache.h" | 7 #include "net/base/host_cache.h" |
| 8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
| 9 #include "net/base/net_log_unittest.h" | 9 #include "net/base/net_log_unittest.h" |
| 10 #include "net/spdy/spdy_io_buffer.h" | 10 #include "net/spdy/spdy_io_buffer.h" |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 363 } |
| 364 | 364 |
| 365 virtual ~StreamReleaserCallback() {} | 365 virtual ~StreamReleaserCallback() {} |
| 366 | 366 |
| 367 scoped_refptr<SpdyStream>* stream() { return &stream_; } | 367 scoped_refptr<SpdyStream>* stream() { return &stream_; } |
| 368 | 368 |
| 369 const CompletionCallback& callback() const { return callback_; } | 369 const CompletionCallback& callback() const { return callback_; } |
| 370 | 370 |
| 371 private: | 371 private: |
| 372 void OnComplete(int result) { | 372 void OnComplete(int result) { |
| 373 session_->CloseSessionOnError(ERR_FAILED, false, "On complete."); | 373 session_->CloseSessionOnError(ERR_FAILED, SPDY_NO_ERROR, false, |
| 374 "On complete."); |
| 374 session_ = NULL; | 375 session_ = NULL; |
| 375 first_stream_->Cancel(); | 376 first_stream_->Cancel(); |
| 376 first_stream_ = NULL; | 377 first_stream_ = NULL; |
| 377 stream_->Cancel(); | 378 stream_->Cancel(); |
| 378 stream_ = NULL; | 379 stream_ = NULL; |
| 379 SetResult(result); | 380 SetResult(result); |
| 380 } | 381 } |
| 381 | 382 |
| 382 scoped_refptr<SpdySession> session_; | 383 scoped_refptr<SpdySession> session_; |
| 383 scoped_refptr<SpdyStream> first_stream_; | 384 scoped_refptr<SpdyStream> first_stream_; |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 net::NetLog::PHASE_NONE); | 1038 net::NetLog::PHASE_NONE); |
| 1038 | 1039 |
| 1039 CapturingNetLog::Entry entry = entries[pos]; | 1040 CapturingNetLog::Entry entry = entries[pos]; |
| 1040 NetLogSpdySessionCloseParameter* request_params = | 1041 NetLogSpdySessionCloseParameter* request_params = |
| 1041 static_cast<NetLogSpdySessionCloseParameter*>( | 1042 static_cast<NetLogSpdySessionCloseParameter*>( |
| 1042 entry.extra_parameters.get()); | 1043 entry.extra_parameters.get()); |
| 1043 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); | 1044 EXPECT_EQ(ERR_CONNECTION_CLOSED, request_params->status()); |
| 1044 } | 1045 } |
| 1045 | 1046 |
| 1046 } // namespace net | 1047 } // namespace net |
| OLD | NEW |