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

Unified Diff: base/nss_util_internal.h

Issue 3186021: DONOTLAND: Start of PK11 password dialog for Linux/NSS (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Start of hooking up the hang monitor, probably requires WebKit changes Created 10 years, 3 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
« no previous file with comments | « base/nss_util.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/nss_util_internal.h
diff --git a/base/nss_util_internal.h b/base/nss_util_internal.h
index 139740b4ab367935de237a73b561901697fe1e6a..a63f1fdf4cba89481e8ec4eb4bc3c20d14d0021b 100644
--- a/base/nss_util_internal.h
+++ b/base/nss_util_internal.h
@@ -17,6 +17,24 @@ namespace base {
// reference with PK11_FreeSlot.
PK11SlotInfo* GetDefaultNSSKeySlot();
+// PK11_SetPasswordFunc is a global setting. To avoid a dependency on
+// network code, we instead pass a PK11BlockingPasswordDelegate in the
+// user data argument and set a global password hook to call it
+// instead.
+class PK11BlockingPasswordDelegate {
+ public:
+ virtual ~PK11BlockingPasswordDelegate() {}
+
+ // Requests a password to unlock |slot|. The interface is
+ // synchronous because NSS cannot issue an asynchronous
+ // request. |retry| is PR_TRUE if this is a request for the retry
+ // and we previously returned the wrong password.
+ //
+ // Result will be zeroed and freed after use. If not NULL, must have
+ // been allocated with PR_Malloc or PL_strdup.
+ virtual char* RequestPassword(PK11SlotInfo* slot, PRBool retry) = 0;
+};
+
} // namespace base
#endif // BASE_NSS_UTIL_H_
« no previous file with comments | « base/nss_util.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698