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

Side by Side Diff: chrome/utility/importer/nss_decryptor_system_nss.cc

Issue 18501013: Move most importer code to chrome/utility/importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CanImport 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) 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 "chrome/browser/importer/nss_decryptor_system_nss.h" 5 #include "chrome/utility/importer/nss_decryptor_system_nss.h"
6 6
7 #include <pk11pub.h> 7 #include <pk11pub.h>
8 #include <pk11sdr.h> 8 #include <pk11sdr.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 #include "crypto/nss_util.h" 14 #include "crypto/nss_util.h"
gab 2013/07/10 13:40:44 +DEPS on crypto/
15 15
16 NSSDecryptor::NSSDecryptor() : is_nss_initialized_(false), db_slot_(NULL) {} 16 NSSDecryptor::NSSDecryptor() : is_nss_initialized_(false), db_slot_(NULL) {}
17 NSSDecryptor::~NSSDecryptor() { 17 NSSDecryptor::~NSSDecryptor() {
18 if (db_slot_) { 18 if (db_slot_) {
19 // Deliberately leave the user db open, just in case we need to open more 19 // Deliberately leave the user db open, just in case we need to open more
20 // than one, because there's an NSS bug with reopening user dbs. 20 // than one, because there's an NSS bug with reopening user dbs.
21 // https://bugzilla.mozilla.org/show_bug.cgi?id=506140 21 // https://bugzilla.mozilla.org/show_bug.cgi?id=506140
22 // SECMOD_CloseUserDB(db_slot_); 22 // SECMOD_CloseUserDB(db_slot_);
23 PK11_FreeSlot(db_slot_); 23 PK11_FreeSlot(db_slot_);
24 } 24 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 loser: 265 loser:
266 if (arena) PORT_FreeArena(arena, PR_TRUE); 266 if (arena) PORT_FreeArena(arena, PR_TRUE);
267 if (key) PK11_FreeSymKey(key); 267 if (key) PK11_FreeSymKey(key);
268 if (params) SECITEM_ZfreeItem(params, PR_TRUE); 268 if (params) SECITEM_ZfreeItem(params, PR_TRUE);
269 if (possibleResult.data) SECITEM_ZfreeItem(&possibleResult, PR_FALSE); 269 if (possibleResult.data) SECITEM_ZfreeItem(&possibleResult, PR_FALSE);
270 270
271 return rv; 271 return rv;
272 } 272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698