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 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 content::BrowserThread::PostTask( | 113 content::BrowserThread::PostTask( |
114 content::BrowserThread::IO, FROM_HERE, | 114 content::BrowserThread::IO, FROM_HERE, |
115 base::Bind(&IOPart::Verify, base::Unretained(io_part_.get()), | 115 base::Bind(&IOPart::Verify, base::Unretained(io_part_.get()), |
116 base::Passed(¶ms), extension_id, finish_callback)); | 116 base::Passed(¶ms), extension_id, finish_callback)); |
117 } | 117 } |
118 | 118 |
119 void VerifyTrustAPI::OnExtensionUnloaded( | 119 void VerifyTrustAPI::OnExtensionUnloaded( |
120 content::BrowserContext* browser_context, | 120 content::BrowserContext* browser_context, |
121 const Extension* extension, | 121 const Extension* extension, |
122 UnloadedExtensionInfo::Reason reason) { | 122 UnloadedExtensionReason reason) { |
123 content::BrowserThread::PostTask( | 123 content::BrowserThread::PostTask( |
124 content::BrowserThread::IO, FROM_HERE, | 124 content::BrowserThread::IO, FROM_HERE, |
125 base::Bind(&IOPart::OnExtensionUnloaded, base::Unretained(io_part_.get()), | 125 base::Bind(&IOPart::OnExtensionUnloaded, base::Unretained(io_part_.get()), |
126 extension->id())); | 126 extension->id())); |
127 } | 127 } |
128 | 128 |
129 void VerifyTrustAPI::FinishedVerificationOnUI(const VerifyCallback& ui_callback, | 129 void VerifyTrustAPI::FinishedVerificationOnUI(const VerifyCallback& ui_callback, |
130 const std::string& error, | 130 const std::string& error, |
131 int return_value, | 131 int return_value, |
132 int cert_status) { | 132 int cert_status) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |