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

Side by Side Diff: crypto/nss_util.cc

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <pk11pub.h> 9 #include <pk11pub.h>
10 #include <plarena.h> 10 #include <plarena.h>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 PRInt32 copied = PR_GetErrorText(error_text.get()); 72 PRInt32 copied = PR_GetErrorText(error_text.get());
73 result = std::string(error_text.get(), copied); 73 result = std::string(error_text.get(), copied);
74 } else { 74 } else {
75 result = base::StringPrintf("NSS error code: %d", PR_GetError()); 75 result = base::StringPrintf("NSS error code: %d", PR_GetError());
76 } 76 }
77 return result; 77 return result;
78 } 78 }
79 79
80 #if defined(USE_NSS) 80 #if defined(USE_NSS)
81 base::FilePath GetDefaultConfigDirectory() { 81 base::FilePath GetDefaultConfigDirectory() {
82 base::FilePath dir = file_util::GetHomeDir(); 82 base::FilePath dir = base::GetHomeDir();
83 if (dir.empty()) { 83 if (dir.empty()) {
84 LOG(ERROR) << "Failed to get home directory."; 84 LOG(ERROR) << "Failed to get home directory.";
85 return dir; 85 return dir;
86 } 86 }
87 dir = dir.AppendASCII(".pki").AppendASCII("nssdb"); 87 dir = dir.AppendASCII(".pki").AppendASCII("nssdb");
88 if (!file_util::CreateDirectory(dir)) { 88 if (!file_util::CreateDirectory(dir)) {
89 LOG(ERROR) << "Failed to create " << dir.value() << " directory."; 89 LOG(ERROR) << "Failed to create " << dir.value() << " directory.";
90 dir.clear(); 90 dir.clear();
91 } 91 }
92 return dir; 92 return dir;
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 801
802 PK11SlotInfo* GetPublicNSSKeySlot() { 802 PK11SlotInfo* GetPublicNSSKeySlot() {
803 return g_nss_singleton.Get().GetPublicNSSKeySlot(); 803 return g_nss_singleton.Get().GetPublicNSSKeySlot();
804 } 804 }
805 805
806 PK11SlotInfo* GetPrivateNSSKeySlot() { 806 PK11SlotInfo* GetPrivateNSSKeySlot() {
807 return g_nss_singleton.Get().GetPrivateNSSKeySlot(); 807 return g_nss_singleton.Get().GetPrivateNSSKeySlot();
808 } 808 }
809 809
810 } // namespace crypto 810 } // namespace crypto
OLDNEW
« no previous file with comments | « content/shell/browser/shell_browser_main.cc ('k') | net/socket/unix_domain_socket_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698