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

Side by Side Diff: chrome/browser/importer/firefox_importer_utils_linux.cc

Issue 159165: Split NSSDecryptor out into platform specific files.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/importer/firefox_importer_utils.h" 5 #include "chrome/browser/importer/firefox_importer_utils.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 8
9 FilePath GetProfilesINI() { 9 FilePath GetProfilesINI() {
10 FilePath ini_file; 10 FilePath ini_file;
11 // The default location of the profile folder containing user data is 11 // The default location of the profile folder containing user data is
12 // under user HOME directory in .mozilla/firefox folder on Linux. 12 // under user HOME directory in .mozilla/firefox folder on Linux.
13 const char *home = getenv("HOME"); 13 const char *home = getenv("HOME");
14 if (home && home[0]) { 14 if (home && home[0]) {
15 ini_file = FilePath(home).Append(".mozilla/firefox/profiles.ini"); 15 ini_file = FilePath(home).Append(".mozilla/firefox/profiles.ini");
16 } 16 }
17 if (file_util::PathExists(ini_file)) 17 if (file_util::PathExists(ini_file))
18 return ini_file; 18 return ini_file;
19 19
20 return FilePath(); 20 return FilePath();
21 } 21 }
22
23 // static
24 const wchar_t NSSDecryptor::kNSS3Library[] = L"libnss3.so";
25 const wchar_t NSSDecryptor::kSoftokn3Library[] = L"libsoftokn3.so";
26 const wchar_t NSSDecryptor::kPLDS4Library[] = L"libplds4.so";
27 const wchar_t NSSDecryptor::kNSPR4Library[] = L"libnspr4.so";
28
29 bool NSSDecryptor::Init(const std::wstring& dll_path,
30 const std::wstring& db_path) {
31 nss3_dll_ = base::LoadNativeLibrary(
32 FilePath::FromWStringHack(kNSS3Library));
33 if (nss3_dll_ == NULL)
34 return false;
35 base::NativeLibrary plds4_lib = base::LoadNativeLibrary(
36 FilePath::FromWStringHack(kPLDS4Library));
37 base::NativeLibrary nspr4_lib = base::LoadNativeLibrary(
38 FilePath::FromWStringHack(kNSPR4Library));
39
40 return InitNSS(db_path, plds4_lib, nspr4_lib);
41 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox_importer_utils.cc ('k') | chrome/browser/importer/firefox_importer_utils_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698