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

Side by Side Diff: crypto/nss_util.cc

Issue 6864020: linux: don't always print dlopen errors from LoadNativeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: owners Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | net/http/http_auth_gssapi_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/nss_util.h" 5 #include "crypto/nss_util.h"
6 #include "crypto/nss_util_internal.h" 6 #include "crypto/nss_util_internal.h"
7 7
8 #include <nss.h> 8 #include <nss.h>
9 #include <plarena.h> 9 #include <plarena.h>
10 #include <prerror.h> 10 #include <prerror.h>
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 std::vector<std::string> libs; 604 std::vector<std::string> libs;
605 libs.push_back("libsoftokn3.so"); 605 libs.push_back("libsoftokn3.so");
606 libs.push_back("libfreebl3.so"); 606 libs.push_back("libfreebl3.so");
607 607
608 // For each combination of library file and path, check for existence and 608 // For each combination of library file and path, check for existence and
609 // then load. 609 // then load.
610 size_t loaded = 0; 610 size_t loaded = 0;
611 for (size_t i = 0; i < libs.size(); ++i) { 611 for (size_t i = 0; i < libs.size(); ++i) {
612 for (size_t j = 0; j < paths.size(); ++j) { 612 for (size_t j = 0; j < paths.size(); ++j) {
613 FilePath path = paths[j].Append(libs[i]); 613 FilePath path = paths[j].Append(libs[i]);
614 base::NativeLibrary lib = base::LoadNativeLibrary(path); 614 base::NativeLibrary lib = base::LoadNativeLibrary(path, NULL);
615 if (lib) { 615 if (lib) {
616 ++loaded; 616 ++loaded;
617 break; 617 break;
618 } 618 }
619 } 619 }
620 } 620 }
621 621
622 if (loaded == libs.size()) { 622 if (loaded == libs.size()) {
623 VLOG(3) << "NSS libraries loaded."; 623 VLOG(3) << "NSS libraries loaded.";
624 } else { 624 } else {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 697
698 PK11SlotInfo* GetPublicNSSKeySlot() { 698 PK11SlotInfo* GetPublicNSSKeySlot() {
699 return g_nss_singleton.Get().GetPublicNSSKeySlot(); 699 return g_nss_singleton.Get().GetPublicNSSKeySlot();
700 } 700 }
701 701
702 PK11SlotInfo* GetPrivateNSSKeySlot() { 702 PK11SlotInfo* GetPrivateNSSKeySlot() {
703 return g_nss_singleton.Get().GetPrivateNSSKeySlot(); 703 return g_nss_singleton.Get().GetPrivateNSSKeySlot();
704 } 704 }
705 705
706 } // namespace crypto 706 } // namespace crypto
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | net/http/http_auth_gssapi_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698