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

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

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: rebase (needs fixing) Created 4 years, 2 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 | « ios/web/shell/shell_url_request_context_getter.mm ('k') | net/net.gypi » ('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 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 params.cert_transparency_verifier = cert_transparency_verifier(); 61 params.cert_transparency_verifier = cert_transparency_verifier();
62 params.ct_policy_enforcer = ct_policy_enforcer(); 62 params.ct_policy_enforcer = ct_policy_enforcer();
63 params.proxy_service = proxy_service(); 63 params.proxy_service = proxy_service();
64 params.ssl_config_service = ssl_config_service(); 64 params.ssl_config_service = ssl_config_service();
65 params.http_server_properties = http_server_properties(); 65 params.http_server_properties = http_server_properties();
66 storage_.set_http_network_session( 66 storage_.set_http_network_session(
67 base::MakeUnique<HttpNetworkSession>(params)); 67 base::MakeUnique<HttpNetworkSession>(params));
68 storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>( 68 storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>(
69 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0), 69 storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0),
70 false /* set_up_quic_server_info */)); 70 false /* set_up_quic_server_info */));
71 storage_.set_job_factory(base::MakeUnique<URLRequestJobFactoryImpl>()); 71 storage_.set_job_factory(
72 URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers());
72 } 73 }
73 74
74 ~RequestContext() override { AssertNoURLRequests(); } 75 ~RequestContext() override { AssertNoURLRequests(); }
75 76
76 private: 77 private:
77 URLRequestContextStorage storage_; 78 URLRequestContextStorage storage_;
78 }; 79 };
79 80
80 class FetchResult { 81 class FetchResult {
81 public: 82 public:
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 EXPECT_EQ(1, network_delegate_.created_requests()); 802 EXPECT_EQ(1, network_delegate_.created_requests());
802 803
803 std::unique_ptr<FetchResult> result = callback1.WaitForResult(); 804 std::unique_ptr<FetchResult> result = callback1.WaitForResult();
804 result->VerifySuccess("-cert.crt-\n"); 805 result->VerifySuccess("-cert.crt-\n");
805 806
806 // request2 was cancelled. 807 // request2 was cancelled.
807 EXPECT_FALSE(callback2.HasResult()); 808 EXPECT_FALSE(callback2.HasResult());
808 } 809 }
809 810
810 } // namespace net 811 } // namespace net
OLDNEW
« no previous file with comments | « ios/web/shell/shell_url_request_context_getter.mm ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698