| 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 #ifndef CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ | 5 #ifndef CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ |
| 6 #define CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ | 6 #define CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // user entered. | 35 // user entered. |
| 36 virtual std::string RequestPassword(const std::string& slot_name, bool retry, | 36 virtual std::string RequestPassword(const std::string& slot_name, bool retry, |
| 37 bool* cancelled) = 0; | 37 bool* cancelled) = 0; |
| 38 | 38 |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // Extends CryptoModuleBlockingPasswordDelegate with the ability to return a | 41 // Extends CryptoModuleBlockingPasswordDelegate with the ability to return a |
| 42 // slot in which to act. (Eg, which slot to store a generated key in.) | 42 // slot in which to act. (Eg, which slot to store a generated key in.) |
| 43 class NSSCryptoModuleDelegate : public CryptoModuleBlockingPasswordDelegate { | 43 class NSSCryptoModuleDelegate : public CryptoModuleBlockingPasswordDelegate { |
| 44 public: | 44 public: |
| 45 virtual ~NSSCryptoModuleDelegate() {} | 45 ~NSSCryptoModuleDelegate() override {} |
| 46 | 46 |
| 47 // Get the slot to store the generated key. | 47 // Get the slot to store the generated key. |
| 48 virtual ScopedPK11Slot RequestSlot() = 0; | 48 virtual ScopedPK11Slot RequestSlot() = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace crypto | 51 } // namespace crypto |
| 52 | 52 |
| 53 #endif // CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ | 53 #endif // CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ |
| OLD | NEW |