Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1642)

Side by Side Diff: net/spdy/spdy_session_spdy3_unittest.cc

Issue 15936003: [SPDY] Refactor SpdyStream::Delegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698