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

Side by Side Diff: net/tools/cert_verify_tool/verify_using_path_builder.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/tools/cert_verify_tool/verify_using_path_builder.h" 5 #include "net/tools/cert_verify_tool/verify_using_path_builder.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // TODO(mattm): add command line flags to configure using CertIssuerSourceAia 221 // TODO(mattm): add command line flags to configure using CertIssuerSourceAia
222 // (similar to VERIFY_CERT_IO_ENABLED flag for CertVerifyProc). 222 // (similar to VERIFY_CERT_IO_ENABLED flag for CertVerifyProc).
223 net::URLRequestContextBuilder url_request_context_builder; 223 net::URLRequestContextBuilder url_request_context_builder;
224 url_request_context_builder.set_user_agent(GetUserAgent()); 224 url_request_context_builder.set_user_agent(GetUserAgent());
225 #if defined(OS_LINUX) 225 #if defined(OS_LINUX)
226 // On Linux, use a fixed ProxyConfigService, since the default one 226 // On Linux, use a fixed ProxyConfigService, since the default one
227 // depends on glib. 227 // depends on glib.
228 // 228 //
229 // TODO(akalin): Remove this once http://crbug.com/146421 is fixed. 229 // TODO(akalin): Remove this once http://crbug.com/146421 is fixed.
230 url_request_context_builder.set_proxy_config_service( 230 url_request_context_builder.set_proxy_config_service(
231 base::WrapUnique(new net::ProxyConfigServiceFixed(net::ProxyConfig()))); 231 base::MakeUnique<net::ProxyConfigServiceFixed>(net::ProxyConfig()));
232 #endif 232 #endif
233 std::unique_ptr<net::URLRequestContext> url_request_context = 233 std::unique_ptr<net::URLRequestContext> url_request_context =
234 url_request_context_builder.Build(); 234 url_request_context_builder.Build();
235 net::CertNetFetcherImpl cert_net_fetcher(url_request_context.get()); 235 net::CertNetFetcherImpl cert_net_fetcher(url_request_context.get());
236 net::CertIssuerSourceAia aia_cert_issuer_source(&cert_net_fetcher); 236 net::CertIssuerSourceAia aia_cert_issuer_source(&cert_net_fetcher);
237 path_builder.AddCertIssuerSource(&aia_cert_issuer_source); 237 path_builder.AddCertIssuerSource(&aia_cert_issuer_source);
238 238
239 net::TestClosure callback; 239 net::TestClosure callback;
240 net::CompletionStatus rv = path_builder.Run(callback.closure()); 240 net::CompletionStatus rv = path_builder.Run(callback.closure());
241 241
(...skipping 18 matching lines...) Expand all
260 if (!DumpParsedCertificateChain( 260 if (!DumpParsedCertificateChain(
261 dump_prefix_path.AddExtension( 261 dump_prefix_path.AddExtension(
262 FILE_PATH_LITERAL(".CertPathBuilder.pem")), 262 FILE_PATH_LITERAL(".CertPathBuilder.pem")),
263 result.paths[result.best_result_index]->path)) { 263 result.paths[result.best_result_index]->path)) {
264 return false; 264 return false;
265 } 265 }
266 } 266 }
267 267
268 return result.HasValidPath(); 268 return result.HasValidPath();
269 } 269 }
OLDNEW
« no previous file with comments | « net/test/url_request/url_request_mock_data_job.cc ('k') | net/tools/get_server_time/get_server_time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698