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

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

Issue 10690104: DeterministicSocketDataProvider should not be RefCounted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include "base/threading/sequenced_worker_pool.h" 7 #include "base/threading/sequenced_worker_pool.h"
8 #include "crypto/ec_private_key.h" 8 #include "crypto/ec_private_key.h"
9 #include "crypto/ec_signature_creator.h" 9 #include "crypto/ec_signature_creator.h"
10 #include "crypto/signature_creator.h" 10 #include "crypto/signature_creator.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 CreateMockRead(*resp, 1), 371 CreateMockRead(*resp, 1),
372 CreateMockRead(*resp2, 4), 372 CreateMockRead(*resp2, 4),
373 MockRead(SYNCHRONOUS, 0, 5) // EOF 373 MockRead(SYNCHRONOUS, 0, 5) // EOF
374 }; 374 };
375 375
376 HostPortPair host_port_pair(HostPortPair::FromURL(GURL(kUrl1))); 376 HostPortPair host_port_pair(HostPortPair::FromURL(GURL(kUrl1)));
377 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct()); 377 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct());
378 378
379 DeterministicMockClientSocketFactory* socket_factory = 379 DeterministicMockClientSocketFactory* socket_factory =
380 session_deps_.deterministic_socket_factory.get(); 380 session_deps_.deterministic_socket_factory.get();
381 scoped_refptr<DeterministicSocketData> data( 381 scoped_ptr<DeterministicSocketData> data(
382 new DeterministicSocketData(reads, arraysize(reads), 382 new DeterministicSocketData(reads, arraysize(reads),
383 writes, arraysize(writes))); 383 writes, arraysize(writes)));
384 socket_factory->AddSocketDataProvider(data.get()); 384 socket_factory->AddSocketDataProvider(data.get());
385 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); 385 SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
386 ssl.channel_id_sent = true; 386 ssl.channel_id_sent = true;
387 ssl.server_bound_cert_service = server_bound_cert_service; 387 ssl.server_bound_cert_service = server_bound_cert_service;
388 ssl.protocol_negotiated = kProtoSPDY3; 388 ssl.protocol_negotiated = kProtoSPDY3;
389 socket_factory->AddSSLSocketDataProvider(&ssl); 389 socket_factory->AddSSLSocketDataProvider(&ssl);
390 http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic( 390 http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic(
391 &session_deps_); 391 &session_deps_);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 sequenced_worker_pool->Shutdown(); 527 sequenced_worker_pool->Shutdown();
528 } 528 }
529 529
530 #endif // !defined(USE_OPENSSL) 530 #endif // !defined(USE_OPENSSL)
531 531
532 // TODO(willchan): Write a longer test for SpdyStream that exercises all 532 // TODO(willchan): Write a longer test for SpdyStream that exercises all
533 // methods. 533 // methods.
534 534
535 } // namespace net 535 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698