| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/crypto_module_password_dialog.h" | 5 #include "chrome/browser/ui/crypto_module_password_dialog.h" |
| 6 | 6 |
| 7 #include <pk11pub.h> | 7 #include <pk11pub.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "net/base/crypto_module.h" | 12 #include "net/base/crypto_module.h" |
| 13 #include "net/base/x509_certificate.h" | 13 #include "net/cert/x509_certificate.h" |
| 14 | 14 |
| 15 #if defined(OS_CHROMEOS) | 15 #if defined(OS_CHROMEOS) |
| 16 #include "crypto/nss_util.h" | 16 #include "crypto/nss_util.h" |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 using content::BrowserThread; | 19 using content::BrowserThread; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 bool ShouldShowDialog(const net::CryptoModule* module) { | 23 bool ShouldShowDialog(const net::CryptoModule* module) { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 chrome::CryptoModulePasswordReason reason, | 153 chrome::CryptoModulePasswordReason reason, |
| 154 const std::string& host, | 154 const std::string& host, |
| 155 const base::Closure& callback) { | 155 const base::Closure& callback) { |
| 156 net::CryptoModuleList modules; | 156 net::CryptoModuleList modules; |
| 157 modules.push_back(net::CryptoModule::CreateFromHandle( | 157 modules.push_back(net::CryptoModule::CreateFromHandle( |
| 158 cert->os_cert_handle()->slot)); | 158 cert->os_cert_handle()->slot)); |
| 159 UnlockSlotsIfNecessary(modules, reason, host, callback); | 159 UnlockSlotsIfNecessary(modules, reason, host, callback); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace chrome | 162 } // namespace chrome |
| OLD | NEW |