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

Side by Side Diff: crypto/scoped_test_system_nss_key_slot.cc

Issue 424523002: Enable system NSS key slot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation of profile_io_data on !OS_CHROMEOS. Created 6 years, 4 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
« no previous file with comments | « crypto/scoped_test_system_nss_key_slot.h ('k') | net/cert/nss_cert_database.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/scoped_test_system_nss_key_slot.h" 5 #include "crypto/scoped_test_system_nss_key_slot.h"
6 6
7 #include "crypto/nss_util_internal.h" 7 #include "crypto/nss_util_internal.h"
8 #include "crypto/scoped_test_nss_db.h" 8 #include "crypto/scoped_test_nss_db.h"
9 9
10 namespace crypto { 10 namespace crypto {
11 11
12 ScopedTestSystemNSSKeySlot::ScopedTestSystemNSSKeySlot() 12 ScopedTestSystemNSSKeySlot::ScopedTestSystemNSSKeySlot()
13 : test_db_(new ScopedTestNSSDB) { 13 : test_db_(new ScopedTestNSSDB) {
14 if (!test_db_->is_open()) 14 if (!test_db_->is_open())
15 return; 15 return;
16 SetSystemKeySlotForTesting( 16 SetSystemKeySlotForTesting(
17 ScopedPK11Slot(PK11_ReferenceSlot(test_db_->slot()))); 17 ScopedPK11Slot(PK11_ReferenceSlot(test_db_->slot())));
18 } 18 }
19 19
20 ScopedTestSystemNSSKeySlot::~ScopedTestSystemNSSKeySlot() { 20 ScopedTestSystemNSSKeySlot::~ScopedTestSystemNSSKeySlot() {
21 SetSystemKeySlotForTesting(ScopedPK11Slot()); 21 SetSystemKeySlotForTesting(ScopedPK11Slot());
22 } 22 }
23 23
24 bool ScopedTestSystemNSSKeySlot::ConstructedSuccessfully() const { 24 bool ScopedTestSystemNSSKeySlot::ConstructedSuccessfully() const {
25 return test_db_->is_open(); 25 return test_db_->is_open();
26 } 26 }
27 27
28 PK11SlotInfo* ScopedTestSystemNSSKeySlot::slot() const {
29 return test_db_->slot();
30 }
31
28 } // namespace crypto 32 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/scoped_test_system_nss_key_slot.h ('k') | net/cert/nss_cert_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698