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

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

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: missing include Created 3 years, 7 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.h
diff --git a/chrome/browser/ui/crypto_module_delegate_nss.h b/chrome/browser/ui/crypto_module_delegate_nss.h
index 45029f8b7c057f7f4cadc05652c01867c4565f3f..f5f9282618a59bc64e1c959459e992e609a4b12b 100644
--- a/chrome/browser/ui/crypto_module_delegate_nss.h
+++ b/chrome/browser/ui/crypto_module_delegate_nss.h
@@ -31,8 +31,6 @@ class ChromeNSSCryptoModuleDelegate
const net::HostPortPair& server,
crypto::ScopedPK11Slot slot);
- ~ChromeNSSCryptoModuleDelegate() override;
-
// Must be called on IO thread. Creates a delegate and returns it
// synchronously or asynchronously to |callback|. If the delegate could not be
// created, |callback| is called with NULL.
@@ -40,8 +38,8 @@ class ChromeNSSCryptoModuleDelegate
chrome::CryptoModulePasswordReason reason,
const net::HostPortPair& server,
content::ResourceContext* context,
- const base::Callback<
- void(std::unique_ptr<ChromeNSSCryptoModuleDelegate>)>& callback);
+ const base::Callback<void(scoped_refptr<ChromeNSSCryptoModuleDelegate>)>&
+ callback);
// crypto::NSSCryptoModuleDelegate implementation.
crypto::ScopedPK11Slot RequestSlot() override;
@@ -52,6 +50,10 @@ class ChromeNSSCryptoModuleDelegate
bool* cancelled) override;
private:
+ friend class base::RefCountedThreadSafe<ChromeNSSCryptoModuleDelegate>;
+
+ ~ChromeNSSCryptoModuleDelegate() override;
+
void ShowDialog(const std::string& slot_name, bool retry);
void GotPassword(const std::string& password);

Powered by Google App Engine
This is Rietveld 408576698