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

Unified Diff: crypto/nss_util.cc

Issue 8143012: Fix library paths for preloading NSS on Ubuntu 11.10. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ARM support. 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
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index 9020e7eb0a46c3dec04bf4f34c111e3fc1e68b1a..4998125cfa2f32fe17e1c568d8a6a0d8298f9806 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -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"
#if defined(OS_CHROMEOS)
@@ -650,9 +651,18 @@ void LoadNSSLibraries() {
// 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");
@@ -675,7 +685,7 @@ void LoadNSSLibraries() {
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