OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/crypto_module_delegate_nss.h" | 5 #include "chrome/browser/ui/crypto_module_delegate_nss.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "chrome/browser/net/nss_context.h" | 10 #include "chrome/browser/net/nss_context.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 } // namespace | 31 } // namespace |
32 | 32 |
33 ChromeNSSCryptoModuleDelegate::ChromeNSSCryptoModuleDelegate( | 33 ChromeNSSCryptoModuleDelegate::ChromeNSSCryptoModuleDelegate( |
34 chrome::CryptoModulePasswordReason reason, | 34 chrome::CryptoModulePasswordReason reason, |
35 const net::HostPortPair& server, | 35 const net::HostPortPair& server, |
36 crypto::ScopedPK11Slot slot) | 36 crypto::ScopedPK11Slot slot) |
37 : reason_(reason), | 37 : reason_(reason), |
38 server_(server), | 38 server_(server), |
39 event_(false, false), | 39 event_(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 40 base::WaitableEvent::InitialState::NOT_SIGNALED), |
40 cancelled_(false), | 41 cancelled_(false), |
41 slot_(std::move(slot)) {} | 42 slot_(std::move(slot)) {} |
42 | 43 |
43 ChromeNSSCryptoModuleDelegate::~ChromeNSSCryptoModuleDelegate() {} | 44 ChromeNSSCryptoModuleDelegate::~ChromeNSSCryptoModuleDelegate() {} |
44 | 45 |
45 // static | 46 // static |
46 void ChromeNSSCryptoModuleDelegate::CreateForResourceContext( | 47 void ChromeNSSCryptoModuleDelegate::CreateForResourceContext( |
47 chrome::CryptoModulePasswordReason reason, | 48 chrome::CryptoModulePasswordReason reason, |
48 const net::HostPortPair& server, | 49 const net::HostPortPair& server, |
49 content::ResourceContext* context, | 50 content::ResourceContext* context, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 crypto::CryptoModuleBlockingPasswordDelegate* | 115 crypto::CryptoModuleBlockingPasswordDelegate* |
115 CreateCryptoModuleBlockingPasswordDelegate( | 116 CreateCryptoModuleBlockingPasswordDelegate( |
116 chrome::CryptoModulePasswordReason reason, | 117 chrome::CryptoModulePasswordReason reason, |
117 const net::HostPortPair& server) { | 118 const net::HostPortPair& server) { |
118 // Returns a ChromeNSSCryptoModuleDelegate without Pk11Slot. Since it is only | 119 // Returns a ChromeNSSCryptoModuleDelegate without Pk11Slot. Since it is only |
119 // being used as a CryptoModuleBlockingDialogDelegate, using a slot handle is | 120 // being used as a CryptoModuleBlockingDialogDelegate, using a slot handle is |
120 // unnecessary. | 121 // unnecessary. |
121 return new ChromeNSSCryptoModuleDelegate( | 122 return new ChromeNSSCryptoModuleDelegate( |
122 reason, server, crypto::ScopedPK11Slot()); | 123 reason, server, crypto::ScopedPK11Slot()); |
123 } | 124 } |
OLD | NEW |