| OLD | NEW |
| 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 "chrome/browser/extensions/api/platform_keys/verify_trust_api.h" | 5 #include "chrome/browser/extensions/api/platform_keys/verify_trust_api.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 if (!base::ContainsKey(extension_to_verifier_, extension_id)) { | 179 if (!base::ContainsKey(extension_to_verifier_, extension_id)) { |
| 180 extension_to_verifier_[extension_id] = | 180 extension_to_verifier_[extension_id] = |
| 181 make_linked_ptr(net::CertVerifier::CreateDefault().release()); | 181 make_linked_ptr(net::CertVerifier::CreateDefault().release()); |
| 182 } | 182 } |
| 183 net::CertVerifier* verifier = extension_to_verifier_[extension_id].get(); | 183 net::CertVerifier* verifier = extension_to_verifier_[extension_id].get(); |
| 184 | 184 |
| 185 std::unique_ptr<net::CertVerifyResult> verify_result( | 185 std::unique_ptr<net::CertVerifyResult> verify_result( |
| 186 new net::CertVerifyResult); | 186 new net::CertVerifyResult); |
| 187 std::unique_ptr<net::BoundNetLog> net_log(new net::BoundNetLog); | 187 std::unique_ptr<net::NetLogWithSource> net_log(new net::NetLogWithSource); |
| 188 const int flags = 0; | 188 const int flags = 0; |
| 189 | 189 |
| 190 std::string ocsp_response; | 190 std::string ocsp_response; |
| 191 net::CertVerifyResult* const verify_result_ptr = verify_result.get(); | 191 net::CertVerifyResult* const verify_result_ptr = verify_result.get(); |
| 192 | 192 |
| 193 RequestState* request_state = new RequestState(); | 193 RequestState* request_state = new RequestState(); |
| 194 base::Callback<void(int)> bound_callback( | 194 base::Callback<void(int)> bound_callback( |
| 195 base::Bind(&IOPart::CallBackWithResult, base::Unretained(this), callback, | 195 base::Bind(&IOPart::CallBackWithResult, base::Unretained(this), callback, |
| 196 base::Passed(&verify_result), base::Owned(request_state))); | 196 base::Passed(&verify_result), base::Owned(request_state))); |
| 197 | 197 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 218 std::unique_ptr<net::CertVerifyResult> verify_result, | 218 std::unique_ptr<net::CertVerifyResult> verify_result, |
| 219 RequestState* request_state, | 219 RequestState* request_state, |
| 220 int return_value) { | 220 int return_value) { |
| 221 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 221 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
| 222 | 222 |
| 223 callback.Run(std::string() /* no error message */, return_value, | 223 callback.Run(std::string() /* no error message */, return_value, |
| 224 verify_result->cert_status); | 224 verify_result->cert_status); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace extensions | 227 } // namespace extensions |
| OLD | NEW |