| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/policy/policy_cert_verifier.h" | 5 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 void PolicyCertVerifier::InitializeOnIOThread( | 52 void PolicyCertVerifier::InitializeOnIOThread( |
| 53 const scoped_refptr<net::CertVerifyProc>& verify_proc) { | 53 const scoped_refptr<net::CertVerifyProc>& verify_proc) { |
| 54 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 54 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 55 if (!verify_proc->SupportsAdditionalTrustAnchors()) { | 55 if (!verify_proc->SupportsAdditionalTrustAnchors()) { |
| 56 LOG(WARNING) | 56 LOG(WARNING) |
| 57 << "Additional trust anchors not supported on the current platform!"; | 57 << "Additional trust anchors not supported on the current platform!"; |
| 58 } | 58 } |
| 59 net::MultiThreadedCertVerifier* verifier = | 59 net::MultiThreadedCertVerifier* verifier = |
| 60 new net::MultiThreadedCertVerifier(verify_proc); | 60 new net::MultiThreadedCertVerifier(verify_proc.get()); |
| 61 verifier->SetCertTrustAnchorProvider(this); | 61 verifier->SetCertTrustAnchorProvider(this); |
| 62 delegate_.reset(verifier); | 62 delegate_.reset(verifier); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void PolicyCertVerifier::SetTrustAnchors( | 65 void PolicyCertVerifier::SetTrustAnchors( |
| 66 const net::CertificateList& trust_anchors) { | 66 const net::CertificateList& trust_anchors) { |
| 67 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 67 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 68 trust_anchors_ = trust_anchors; | 68 trust_anchors_ = trust_anchors; |
| 69 } | 69 } |
| 70 | 70 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 94 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 94 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 95 delegate_->CancelRequest(req); | 95 delegate_->CancelRequest(req); |
| 96 } | 96 } |
| 97 | 97 |
| 98 const net::CertificateList& PolicyCertVerifier::GetAdditionalTrustAnchors() { | 98 const net::CertificateList& PolicyCertVerifier::GetAdditionalTrustAnchors() { |
| 99 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 99 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 100 return trust_anchors_; | 100 return trust_anchors_; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace policy | 103 } // namespace policy |
| OLD | NEW |