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

Unified Diff: chrome/browser/ui/crypto_module_delegate_nss.cc

Issue 384413004: Remove default key slot from KeygenHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compilation, addressed suggestions. Created 6 years, 5 months 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
Index: chrome/browser/ui/crypto_module_delegate_nss.cc
diff --git a/chrome/browser/ui/crypto_module_delegate_nss.cc b/chrome/browser/ui/crypto_module_delegate_nss.cc
index 4829a4ab320bfd940d1eab36c1a2adc74f5eddd7..5036764d4e9f342dc24e482eb6f5128c9900ff48 100644
--- a/chrome/browser/ui/crypto_module_delegate_nss.cc
+++ b/chrome/browser/ui/crypto_module_delegate_nss.cc
@@ -6,7 +6,6 @@
#include "base/basictypes.h"
#include "base/bind.h"
-#include "chrome/browser/net/nss_context.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
@@ -21,28 +20,6 @@ ChromeNSSCryptoModuleDelegate::ChromeNSSCryptoModuleDelegate(
ChromeNSSCryptoModuleDelegate::~ChromeNSSCryptoModuleDelegate() {}
-bool ChromeNSSCryptoModuleDelegate::InitializeSlot(
- content::ResourceContext* context,
- const base::Closure& initialization_complete_callback) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- DCHECK(!slot_);
- base::Callback<void(crypto::ScopedPK11Slot)> get_slot_callback;
- if (!initialization_complete_callback.is_null())
- get_slot_callback = base::Bind(&ChromeNSSCryptoModuleDelegate::DidGetSlot,
- // Caller is responsible for keeping |this|
- // alive until the callback is run.
- base::Unretained(this),
- initialization_complete_callback);
-
- slot_ = GetPrivateNSSKeySlotForResourceContext(context, get_slot_callback);
- return slot_.get() != NULL;
-}
-
-// TODO(mattm): allow choosing which slot to generate and store the key.
-crypto::ScopedPK11Slot ChromeNSSCryptoModuleDelegate::RequestSlot() {
- return slot_.Pass();
-}
-
std::string ChromeNSSCryptoModuleDelegate::RequestPassword(
const std::string& slot_name,
bool retry,
@@ -88,13 +65,6 @@ void ChromeNSSCryptoModuleDelegate::GotPassword(const std::string& password) {
event_.Signal();
}
-void ChromeNSSCryptoModuleDelegate::DidGetSlot(const base::Closure& callback,
- crypto::ScopedPK11Slot slot) {
- DCHECK(!slot_);
- slot_ = slot.Pass();
- callback.Run();
-}
-
crypto::CryptoModuleBlockingPasswordDelegate*
CreateCryptoModuleBlockingPasswordDelegate(
chrome::CryptoModulePasswordReason reason,

Powered by Google App Engine
This is Rietveld 408576698