Chromium Code Reviews| 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 || |