Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: net/base/keygen_handler.h

Issue 61643007: Update keygen to use correct NSS slot on ChromeOS multiprofile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jam review changes Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/nss_util.cc ('k') | net/base/keygen_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/keygen_handler.h
diff --git a/net/base/keygen_handler.h b/net/base/keygen_handler.h
index 4895dacb57e655d4e26360d761483fbe5cc15e1f..8262775505ceb3b7726c59ca85a8198f5cb0b0e3 100644
--- a/net/base/keygen_handler.h
+++ b/net/base/keygen_handler.h
@@ -7,14 +7,15 @@
#include <string>
+#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "net/base/net_export.h"
#include "url/gurl.h"
-#if defined(USE_NSS)
-#include "crypto/crypto_module_blocking_password_delegate.h"
-#endif // defined(USE_NSS)
+namespace crypto {
+class NSSCryptoModuleDelegate;
+}
namespace net {
@@ -41,12 +42,12 @@ class NET_EXPORT KeygenHandler {
void set_stores_key(bool store) { stores_key_ = store;}
#if defined(USE_NSS)
- // Register the password delegate to be used if the token is unauthenticated.
- // GenKeyAndSignChallenge runs on a worker thread, so using the blocking
+ // Register the delegate to be used to get the token to store the key in, and
+ // to get the password if the token is unauthenticated.
+ // GenKeyAndSignChallenge runs on a worker thread, so using a blocking
// password callback is okay here.
- // Takes ownership of the delegate.
- void set_crypto_module_password_delegate(
- crypto::CryptoModuleBlockingPasswordDelegate* delegate);
+ void set_crypto_module_delegate(
+ scoped_ptr<crypto::NSSCryptoModuleDelegate> delegate);
#endif // defined(USE_NSS)
private:
@@ -56,8 +57,7 @@ class NET_EXPORT KeygenHandler {
bool stores_key_; // should the generated key-pair be stored persistently?
#if defined(USE_NSS)
// The callback for requesting a password to the PKCS#11 token.
- scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate>
- crypto_module_password_delegate_;
+ scoped_ptr<crypto::NSSCryptoModuleDelegate> crypto_module_delegate_;
#endif // defined(USE_NSS)
};
« no previous file with comments | « crypto/nss_util.cc ('k') | net/base/keygen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698