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

Side by Side Diff: chrome/utility/importer/nss_decryptor_mac.mm

Issue 18501013: Move most importer code to chrome/utility/importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another gyp attempt Created 7 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
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 <Cocoa/Cocoa.h> 5 #include <Cocoa/Cocoa.h>
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 12
13 #include "chrome/browser/importer/firefox_importer_utils.h" 13 #include "chrome/common/importer/firefox_importer_utils.h"
14 #include "chrome/browser/importer/nss_decryptor_mac.h" 14 #include "chrome/utility/importer/nss_decryptor_mac.h"
15 15
16 // Important!! : On OS X the nss3 libraries are compiled with depedencies 16 // Important!! : On OS X the nss3 libraries are compiled with depedencies
17 // on one another, referenced using dyld's @executable_path directive. 17 // on one another, referenced using dyld's @executable_path directive.
18 // To make a long story short in order to get the libraries to load, dyld's 18 // To make a long story short in order to get the libraries to load, dyld's
19 // fallback path needs to be set to the directory containing the libraries. 19 // fallback path needs to be set to the directory containing the libraries.
20 // To do so, the process this function runs in must have the 20 // To do so, the process this function runs in must have the
21 // DYLD_FALLBACK_LIBRARY_PATH set on startup to said directory. 21 // DYLD_FALLBACK_LIBRARY_PATH set on startup to said directory.
22 bool NSSDecryptor::Init(const base::FilePath& dll_path, 22 bool NSSDecryptor::Init(const base::FilePath& dll_path,
23 const base::FilePath& db_path) { 23 const base::FilePath& db_path) {
24 if (getenv("DYLD_FALLBACK_LIBRARY_PATH") == NULL) { 24 if (getenv("DYLD_FALLBACK_LIBRARY_PATH") == NULL) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 is_nss_initialized_ = true; 62 is_nss_initialized_ = true;
63 return true; 63 return true;
64 } 64 }
65 65
66 NSSDecryptor::~NSSDecryptor() { 66 NSSDecryptor::~NSSDecryptor() {
67 if (NSS_Shutdown && is_nss_initialized_) { 67 if (NSS_Shutdown && is_nss_initialized_) {
68 NSS_Shutdown(); 68 NSS_Shutdown();
69 is_nss_initialized_ = false; 69 is_nss_initialized_ = false;
70 } 70 }
71 } 71 }
OLDNEW
« no previous file with comments | « chrome/utility/importer/nss_decryptor_mac.h ('k') | chrome/utility/importer/nss_decryptor_null.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698