| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3238 StreamClosingDelegate(const base::WeakPtr<SpdyStream>& stream, | 3238 StreamClosingDelegate(const base::WeakPtr<SpdyStream>& stream, |
| 3239 base::StringPiece data) | 3239 base::StringPiece data) |
| 3240 : StreamDelegateWithBody(stream, data) {} | 3240 : StreamDelegateWithBody(stream, data) {} |
| 3241 | 3241 |
| 3242 virtual ~StreamClosingDelegate() {} | 3242 virtual ~StreamClosingDelegate() {} |
| 3243 | 3243 |
| 3244 void set_stream_to_close(const base::WeakPtr<SpdyStream>& stream_to_close) { | 3244 void set_stream_to_close(const base::WeakPtr<SpdyStream>& stream_to_close) { |
| 3245 stream_to_close_ = stream_to_close; | 3245 stream_to_close_ = stream_to_close; |
| 3246 } | 3246 } |
| 3247 | 3247 |
| 3248 virtual void OnSendBodyComplete() OVERRIDE { | 3248 virtual void OnDataSent() OVERRIDE { |
| 3249 test::StreamDelegateWithBody::OnSendBodyComplete(); | 3249 test::StreamDelegateWithBody::OnDataSent(); |
| 3250 if (stream_to_close_) { | 3250 if (stream_to_close_) { |
| 3251 stream_to_close_->Close(); | 3251 stream_to_close_->Close(); |
| 3252 EXPECT_EQ(NULL, stream_to_close_.get()); | 3252 EXPECT_EQ(NULL, stream_to_close_.get()); |
| 3253 } | 3253 } |
| 3254 } | 3254 } |
| 3255 | 3255 |
| 3256 private: | 3256 private: |
| 3257 base::WeakPtr<SpdyStream> stream_to_close_; | 3257 base::WeakPtr<SpdyStream> stream_to_close_; |
| 3258 }; | 3258 }; |
| 3259 | 3259 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3772 spdy_session_pool_->Remove(session_privacy_enabled); | 3772 spdy_session_pool_->Remove(session_privacy_enabled); |
| 3773 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled)); | 3773 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled)); |
| 3774 EXPECT_TRUE(spdy_session_pool_->HasSession(key_privacy_disabled)); | 3774 EXPECT_TRUE(spdy_session_pool_->HasSession(key_privacy_disabled)); |
| 3775 | 3775 |
| 3776 spdy_session_pool_->Remove(session_privacy_disabled); | 3776 spdy_session_pool_->Remove(session_privacy_disabled); |
| 3777 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled)); | 3777 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled)); |
| 3778 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_disabled)); | 3778 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_disabled)); |
| 3779 } | 3779 } |
| 3780 | 3780 |
| 3781 } // namespace net | 3781 } // namespace net |
| OLD | NEW |