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

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

Issue 353713005: Implements new, more robust design for communicating between SSLConnectJobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added checks to determine if false start connections fail, and moved location of enable_job_waiting… Created 6 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 virtual int Write(IOBuffer* buf, int buf_len, 614 virtual int Write(IOBuffer* buf, int buf_len,
615 const CompletionCallback& callback) OVERRIDE { 615 const CompletionCallback& callback) OVERRIDE {
616 return ERR_IO_PENDING; 616 return ERR_IO_PENDING;
617 } 617 }
618 618
619 // Return kProtoUnknown to use the pool's default protocol. 619 // Return kProtoUnknown to use the pool's default protocol.
620 virtual NextProto GetNegotiatedProtocol() const OVERRIDE { 620 virtual NextProto GetNegotiatedProtocol() const OVERRIDE {
621 return kProtoUnknown; 621 return kProtoUnknown;
622 } 622 }
623 623
624 // The functions below are not expected to be called. 624 // The functions below are not expected to be called.
wtc 2014/07/08 01:25:43 Note this comment. Therefore, the three new metho
mshelley 2014/07/09 19:51:02 Done.
625 625
626 virtual int Connect(const CompletionCallback& callback) OVERRIDE { 626 virtual int Connect(const CompletionCallback& callback) OVERRIDE {
627 ADD_FAILURE(); 627 ADD_FAILURE();
628 return ERR_UNEXPECTED; 628 return ERR_UNEXPECTED;
629 } 629 }
630 630
631 virtual bool WasEverUsed() const OVERRIDE { 631 virtual bool WasEverUsed() const OVERRIDE {
632 ADD_FAILURE(); 632 ADD_FAILURE();
633 return false; 633 return false;
634 } 634 }
635 635
636 virtual bool UsingTCPFastOpen() const OVERRIDE { 636 virtual bool UsingTCPFastOpen() const OVERRIDE {
637 ADD_FAILURE(); 637 ADD_FAILURE();
638 return false; 638 return false;
639 } 639 }
640 640
641 virtual bool WasNpnNegotiated() const OVERRIDE { 641 virtual bool WasNpnNegotiated() const OVERRIDE {
642 ADD_FAILURE(); 642 ADD_FAILURE();
643 return false; 643 return false;
644 } 644 }
645 645
646 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE { 646 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE {
647 ADD_FAILURE(); 647 ADD_FAILURE();
648 return false; 648 return false;
649 } 649 }
650 650
651 bool InSessionCache() const { return false; }
652
653 void OnSessionComplete(const base::Closure& cb) const { return; }
654
655 void OnSocketFailure(const base::Closure& cb) { return; }
wtc 2014/07/08 01:25:43 Are you sure we need to add these three methods?
mshelley 2014/07/09 19:51:02 Done.
656
651 private: 657 private:
652 int read_result_; 658 int read_result_;
653 }; 659 };
654 660
655 base::WeakPtr<SpdySession> CreateFakeSpdySessionHelper( 661 base::WeakPtr<SpdySession> CreateFakeSpdySessionHelper(
656 SpdySessionPool* pool, 662 SpdySessionPool* pool,
657 const SpdySessionKey& key, 663 const SpdySessionKey& key,
658 Error expected_status) { 664 Error expected_status) {
659 EXPECT_NE(expected_status, ERR_IO_PENDING); 665 EXPECT_NE(expected_status, ERR_IO_PENDING);
660 EXPECT_FALSE(HasSpdySession(pool, key)); 666 EXPECT_FALSE(HasSpdySession(pool, key));
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 } 1244 }
1239 } 1245 }
1240 1246
1241 void SpdyTestUtil::SetPriority(RequestPriority priority, 1247 void SpdyTestUtil::SetPriority(RequestPriority priority,
1242 SpdySynStreamIR* ir) const { 1248 SpdySynStreamIR* ir) const {
1243 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1249 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1244 priority, spdy_version())); 1250 priority, spdy_version()));
1245 } 1251 }
1246 1252
1247 } // namespace net 1253 } // namespace net
OLDNEW
« net/socket/ssl_session_cache_openssl.cc ('K') | « net/socket/ssl_session_cache_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698