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

Unified Diff: crypto/nss_util.cc

Issue 8216025: Merge 104421 - Fix library paths for preloading NSS on Ubuntu 11.10. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874/src/
Patch Set: Created 9 years, 2 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: crypto/nss_util.cc
===================================================================
--- crypto/nss_util.cc (revision 104796)
+++ crypto/nss_util.cc (working copy)
@@ -29,6 +29,7 @@
#include "base/native_library.h"
#include "base/stringprintf.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "crypto/scoped_nss_types.h"
// USE_NSS means we use NSS for everything crypto-related. If USE_NSS is not
@@ -603,9 +604,18 @@
// Use relative path to Search PATH for the library files.
paths.push_back(FilePath());
- // For Debian derivaties NSS libraries are located here.
+ // For Debian derivatives NSS libraries are located here.
paths.push_back(FilePath("/usr/lib/nss"));
+ // Ubuntu 11.10 (Oneiric) places the libraries here.
+#if defined(ARCH_CPU_X86_64)
+ paths.push_back(FilePath("/usr/lib/x86_64-linux-gnu/nss"));
+#elif defined(ARCH_CPU_X86)
+ paths.push_back(FilePath("/usr/lib/i386-linux-gnu/nss"));
+#elif defined(ARCH_CPU_ARMEL)
+ paths.push_back(FilePath("/usr/lib/arm-linux-gnueabi/nss"));
+#endif
+
// A list of library files to load.
std::vector<std::string> libs;
libs.push_back("libsoftokn3.so");
@@ -628,7 +638,7 @@
if (loaded == libs.size()) {
VLOG(3) << "NSS libraries loaded.";
} else {
- LOG(WARNING) << "Failed to load NSS libraries.";
+ LOG(ERROR) << "Failed to load NSS libraries.";
}
#endif
}
« 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