| Index: base/nss_util.cc
|
| diff --git a/base/nss_util.cc b/base/nss_util.cc
|
| index 927f1abd0e0b46bc9b5c89883f8e77e4fb3a9f16..14c27af249ce849169f07cee3f59c1cd2339cccd 100644
|
| --- a/base/nss_util.cc
|
| +++ b/base/nss_util.cc
|
| @@ -34,16 +34,16 @@ namespace {
|
|
|
| #if !defined(USE_NSS_FOR_SSL_ONLY)
|
| std::string GetDefaultConfigDirectory() {
|
| - const char* home = getenv("HOME");
|
| - if (home == NULL) {
|
| + FilePath home = file_util::GetHomeDir();
|
| + if (home.empty()) {
|
| LOG(ERROR) << "$HOME is not set.";
|
| - return "";
|
| + return std::string();
|
| }
|
| FilePath dir(home);
|
| dir = dir.AppendASCII(".pki").AppendASCII("nssdb");
|
| if (!file_util::CreateDirectory(dir)) {
|
| LOG(ERROR) << "Failed to create ~/.pki/nssdb directory.";
|
| - return "";
|
| + return std::string();
|
| }
|
| return dir.value();
|
| }
|
|
|