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

Side by Side Diff: net/cert_net/cert_net_fetcher_impl_unittest.cc

Issue 1342613002: Revert of Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | net/http/http_cache.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/cert_net/cert_net_fetcher_impl.h" 5 #include "net/cert_net/cert_net_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 30 matching lines...) Expand all
41 storage_.set_http_server_properties( 41 storage_.set_http_server_properties(
42 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl())); 42 scoped_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
43 43
44 HttpNetworkSession::Params params; 44 HttpNetworkSession::Params params;
45 params.host_resolver = host_resolver(); 45 params.host_resolver = host_resolver();
46 params.cert_verifier = cert_verifier(); 46 params.cert_verifier = cert_verifier();
47 params.transport_security_state = transport_security_state(); 47 params.transport_security_state = transport_security_state();
48 params.proxy_service = proxy_service(); 48 params.proxy_service = proxy_service();
49 params.ssl_config_service = ssl_config_service(); 49 params.ssl_config_service = ssl_config_service();
50 params.http_server_properties = http_server_properties(); 50 params.http_server_properties = http_server_properties();
51 storage_.set_http_network_session( 51 scoped_refptr<HttpNetworkSession> network_session(
52 make_scoped_ptr(new HttpNetworkSession(params))); 52 new HttpNetworkSession(params));
53 storage_.set_http_transaction_factory(new HttpCache( 53 storage_.set_http_transaction_factory(new HttpCache(
54 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0), 54 network_session.get(), HttpCache::DefaultBackend::InMemory(0)));
55 false /* set_up_quic_server_info */));
56 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl(); 55 URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl();
57 storage_.set_job_factory(job_factory); 56 storage_.set_job_factory(job_factory);
58 } 57 }
59 58
60 ~RequestContext() override { AssertNoURLRequests(); } 59 ~RequestContext() override { AssertNoURLRequests(); }
61 60
62 private: 61 private:
63 URLRequestContextStorage storage_; 62 URLRequestContextStorage storage_;
64 }; 63 };
65 64
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 EXPECT_EQ(1, network_delegate_.created_requests()); 749 EXPECT_EQ(1, network_delegate_.created_requests());
751 750
752 scoped_ptr<FetchResult> result = callback1.WaitForResult(); 751 scoped_ptr<FetchResult> result = callback1.WaitForResult();
753 result->VerifySuccess("-cert.crt-\n"); 752 result->VerifySuccess("-cert.crt-\n");
754 753
755 // request2 was cancelled. 754 // request2 was cancelled.
756 EXPECT_FALSE(callback2.HasResult()); 755 EXPECT_FALSE(callback2.HasResult());
757 } 756 }
758 757
759 } // namespace net 758 } // namespace net
OLDNEW
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698