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

Unified Diff: chrome/utility/importer/nss_decryptor_win.cc

Issue 23799008: Fix import Firefox passwords on Windows (silent failure); plds4.dll and nspr4.dll no longer exist (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/importer/nss_decryptor_win.cc
===================================================================
--- chrome/utility/importer/nss_decryptor_win.cc (revision 221155)
+++ chrome/utility/importer/nss_decryptor_win.cc (working copy)
@@ -106,12 +106,6 @@
bool NSSDecryptor::InitNSS(const base::FilePath& db_path,
base::NativeLibrary plds4_dll,
base::NativeLibrary nspr4_dll) {
- // NSPR DLLs are already loaded now.
- if (plds4_dll == NULL || nspr4_dll == NULL) {
- Free();
- return false;
- }
-
// Gets the function address.
NSS_Init = (NSSInitFunc)
base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "NSS_Init");
@@ -128,10 +122,19 @@
base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "PK11SDR_Decrypt");
SECITEM_FreeItem = (SECITEMFreeItemFunc)
base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "SECITEM_FreeItem");
- PL_ArenaFinish = (PLArenaFinishFunc)
- base::GetFunctionPointerFromNativeLibrary(plds4_dll, "PL_ArenaFinish");
- PR_Cleanup = (PRCleanupFunc)
- base::GetFunctionPointerFromNativeLibrary(nspr4_dll, "PR_Cleanup");
+ // Firefox 22 and higher PL_ArenaFinish and PR_Cleanup moved from plds4.dll
Peter Kasting 2013/09/11 05:18:44 Nit: Please use complete grammatical sentences: O
+ // to nss3.dll
+ if (plds4_dll == NULL) {
+ PL_ArenaFinish = (PLArenaFinishFunc)(
+ base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "PL_ArenaFinish"));
+ PR_Cleanup = (PRCleanupFunc)(
+ base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "PR_Cleanup"));
+ } else {
+ PL_ArenaFinish = (PLArenaFinishFunc)(
+ base::GetFunctionPointerFromNativeLibrary(nspr4_dll, "PL_ArenaFinish"));
+ PR_Cleanup = (PRCleanupFunc)(
+ base::GetFunctionPointerFromNativeLibrary(nspr4_dll, "PR_Cleanup"));
+ }
if (NSS_Init == NULL || NSS_Shutdown == NULL ||
PK11_GetInternalKeySlot == NULL || PK11_FreeSlot == NULL ||
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698