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

Side by Side Diff: ios/web/net/crw_cert_verification_controller.mm

Issue 1477643002: Remove the TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 macro. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basepass
Patch Set: type-with-move: no-media Created 5 years 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/net/cert_verifier_block_adapter.cc ('k') | ipc/handle_win.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 #import "ios/web/net/crw_cert_verification_controller.h" 5 #import "ios/web/net/crw_cert_verification_controller.h"
6 6
7 #include "base/ios/block_types.h" 7 #include "base/ios/block_types.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bind_objc_block.h" 9 #include "base/mac/bind_objc_block.h"
10 #include "base/mac/scoped_block.h" 10 #include "base/mac/scoped_block.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 DCHECK(completionHandler); 419 DCHECK(completionHandler);
420 __block scoped_refptr<net::X509Certificate> blockCert = cert; 420 __block scoped_refptr<net::X509Certificate> blockCert = cert;
421 web::WebThread::PostTask(web::WebThread::IO, FROM_HERE, base::BindBlock(^{ 421 web::WebThread::PostTask(web::WebThread::IO, FROM_HERE, base::BindBlock(^{
422 // WeakNSObject does not work across different threads, hence this block 422 // WeakNSObject does not work across different threads, hence this block
423 // retains self. 423 // retains self.
424 if (!_certVerifier) { 424 if (!_certVerifier) {
425 completionHandler(net::CertVerifyResult()); 425 completionHandler(net::CertVerifyResult());
426 return; 426 return;
427 } 427 }
428 428
429 web::CertVerifierBlockAdapter::Params params( 429 web::CertVerifierBlockAdapter::Params params(std::move(blockCert),
430 blockCert.Pass(), base::SysNSStringToUTF8(host)); 430 base::SysNSStringToUTF8(host));
431 params.flags = self.certVerifyFlags; 431 params.flags = self.certVerifyFlags;
432 // OCSP response is not provided by iOS API. 432 // OCSP response is not provided by iOS API.
433 // CRLSets are not used, as the OS is used to make load/no-load 433 // CRLSets are not used, as the OS is used to make load/no-load
434 // decisions, not the CertVerifier. 434 // decisions, not the CertVerifier.
435 _certVerifier->Verify(params, ^(net::CertVerifyResult result, int) { 435 _certVerifier->Verify(params, ^(net::CertVerifyResult result, int) {
436 completionHandler(result); 436 completionHandler(result);
437 }); 437 });
438 })); 438 }));
439 } 439 }
440 440
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( 476 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy(
477 leafCert.get(), base::SysNSStringToUTF8(host), 477 leafCert.get(), base::SysNSStringToUTF8(host),
478 certVerifierResult.cert_status); 478 certVerifierResult.cert_status);
479 479
480 return (judgment == web::CertPolicy::ALLOWED) 480 return (judgment == web::CertPolicy::ALLOWED)
481 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER 481 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER
482 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; 482 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER;
483 } 483 }
484 484
485 @end 485 @end
OLDNEW
« no previous file with comments | « ios/web/net/cert_verifier_block_adapter.cc ('k') | ipc/handle_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698