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

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

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 | « net/cert/internal/signature_algorithm.cc ('k') | net/cookies/cookie_monster.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 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 HttpNetworkSession::Params params; 57 HttpNetworkSession::Params params;
58 params.host_resolver = host_resolver(); 58 params.host_resolver = host_resolver();
59 params.cert_verifier = cert_verifier(); 59 params.cert_verifier = cert_verifier();
60 params.transport_security_state = transport_security_state(); 60 params.transport_security_state = transport_security_state();
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::WrapUnique(new HttpNetworkSession(params))); 67 base::MakeUnique<HttpNetworkSession>(params));
68 storage_.set_http_transaction_factory(base::WrapUnique(new 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::WrapUnique(new URLRequestJobFactoryImpl())); 71 storage_.set_job_factory(base::MakeUnique<URLRequestJobFactoryImpl>());
72 } 72 }
73 73
74 ~RequestContext() override { AssertNoURLRequests(); } 74 ~RequestContext() override { AssertNoURLRequests(); }
75 75
76 private: 76 private:
77 URLRequestContextStorage storage_; 77 URLRequestContextStorage storage_;
78 }; 78 };
79 79
80 class FetchResult { 80 class FetchResult {
81 public: 81 public:
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 EXPECT_EQ(1, network_delegate_.created_requests()); 763 EXPECT_EQ(1, network_delegate_.created_requests());
764 764
765 std::unique_ptr<FetchResult> result = callback1.WaitForResult(); 765 std::unique_ptr<FetchResult> result = callback1.WaitForResult();
766 result->VerifySuccess("-cert.crt-\n"); 766 result->VerifySuccess("-cert.crt-\n");
767 767
768 // request2 was cancelled. 768 // request2 was cancelled.
769 EXPECT_FALSE(callback2.HasResult()); 769 EXPECT_FALSE(callback2.HasResult());
770 } 770 }
771 771
772 } // namespace net 772 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/signature_algorithm.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698