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

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: One more leak fix 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
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('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_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include "base/memory/scoped_ptr.h"
7 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
8 #include "crypto/ec_private_key.h" 9 #include "crypto/ec_private_key.h"
9 #include "crypto/ec_signature_creator.h" 10 #include "crypto/ec_signature_creator.h"
10 #include "crypto/signature_creator.h" 11 #include "crypto/signature_creator.h"
11 #include "net/base/asn1_util.h" 12 #include "net/base/asn1_util.h"
12 #include "net/base/default_server_bound_cert_store.h" 13 #include "net/base/default_server_bound_cert_store.h"
13 #include "net/http/http_response_headers.h" 14 #include "net/http/http_response_headers.h"
14 #include "net/http/http_response_info.h" 15 #include "net/http/http_response_info.h"
15 #include "net/spdy/spdy_http_utils.h" 16 #include "net/spdy/spdy_http_utils.h"
16 #include "net/spdy/spdy_session.h" 17 #include "net/spdy/spdy_session.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 CreateMockRead(*resp, 1), 372 CreateMockRead(*resp, 1),
372 CreateMockRead(*resp2, 4), 373 CreateMockRead(*resp2, 4),
373 MockRead(SYNCHRONOUS, 0, 5) // EOF 374 MockRead(SYNCHRONOUS, 0, 5) // EOF
374 }; 375 };
375 376
376 HostPortPair host_port_pair(HostPortPair::FromURL(GURL(kUrl1))); 377 HostPortPair host_port_pair(HostPortPair::FromURL(GURL(kUrl1)));
377 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct()); 378 HostPortProxyPair pair(host_port_pair, ProxyServer::Direct());
378 379
379 DeterministicMockClientSocketFactory* socket_factory = 380 DeterministicMockClientSocketFactory* socket_factory =
380 session_deps_.deterministic_socket_factory.get(); 381 session_deps_.deterministic_socket_factory.get();
381 scoped_refptr<DeterministicSocketData> data( 382 scoped_ptr<DeterministicSocketData> data(
382 new DeterministicSocketData(reads, arraysize(reads), 383 new DeterministicSocketData(reads, arraysize(reads),
383 writes, arraysize(writes))); 384 writes, arraysize(writes)));
384 socket_factory->AddSocketDataProvider(data.get()); 385 socket_factory->AddSocketDataProvider(data.get());
385 SSLSocketDataProvider ssl(SYNCHRONOUS, OK); 386 SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
386 ssl.channel_id_sent = true; 387 ssl.channel_id_sent = true;
387 ssl.server_bound_cert_service = server_bound_cert_service; 388 ssl.server_bound_cert_service = server_bound_cert_service;
388 ssl.protocol_negotiated = kProtoSPDY3; 389 ssl.protocol_negotiated = kProtoSPDY3;
389 socket_factory->AddSSLSocketDataProvider(&ssl); 390 socket_factory->AddSSLSocketDataProvider(&ssl);
390 http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic( 391 http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic(
391 &session_deps_); 392 &session_deps_);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 527
527 sequenced_worker_pool->Shutdown(); 528 sequenced_worker_pool->Shutdown();
528 } 529 }
529 530
530 #endif // !defined(USE_OPENSSL) 531 #endif // !defined(USE_OPENSSL)
531 532
532 // TODO(willchan): Write a longer test for SpdyStream that exercises all 533 // TODO(willchan): Write a longer test for SpdyStream that exercises all
533 // methods. 534 // methods.
534 535
535 } // namespace net 536 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698