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

Side by Side Diff: crypto/scoped_test_system_nss_key_slot.h

Issue 1413173005: Deprecate *_EXPORT_PRIVATE macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format Created 5 years, 1 month 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
« no previous file with comments | « crypto/scoped_test_nss_db.h ('k') | sandbox/sandbox_export.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 #ifndef CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_ 5 #ifndef CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_
6 #define CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_ 6 #define CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "crypto/crypto_export.h" 10 #include "crypto/crypto_export.h"
11 11
12 // Forward declaration, from <pk11pub.h> 12 // Forward declaration, from <pk11pub.h>
13 typedef struct PK11SlotInfoStr PK11SlotInfo; 13 typedef struct PK11SlotInfoStr PK11SlotInfo;
14 14
15 namespace crypto { 15 namespace crypto {
16 16
17 class ScopedTestNSSDB; 17 class ScopedTestNSSDB;
18 18
19 // Opens a persistent NSS software database in a temporary directory and sets 19 // Opens a persistent NSS software database in a temporary directory and sets
20 // the test system slot to the opened database. This helper should be created in 20 // the test system slot to the opened database. This helper should be created in
21 // tests to fake the system token that is usually provided by the Chaps module. 21 // tests to fake the system token that is usually provided by the Chaps module.
22 // |slot| is exposed through |GetSystemNSSKeySlot| and |IsTPMTokenReady| will 22 // |slot| is exposed through |GetSystemNSSKeySlot| and |IsTPMTokenReady| will
23 // return true. 23 // return true.
24 // |InitializeTPMTokenAndSystemSlot|, which triggers the TPM initialization, 24 // |InitializeTPMTokenAndSystemSlot|, which triggers the TPM initialization,
25 // does not have to be called if this helper is used. 25 // does not have to be called if this helper is used.
26 // At most one instance of this helper must be used at a time. 26 // At most one instance of this helper must be used at a time.
27 class CRYPTO_EXPORT_PRIVATE ScopedTestSystemNSSKeySlot { 27 class CRYPTO_EXPORT ScopedTestSystemNSSKeySlot {
28 public: 28 public:
29 explicit ScopedTestSystemNSSKeySlot(); 29 explicit ScopedTestSystemNSSKeySlot();
30 ~ScopedTestSystemNSSKeySlot(); 30 ~ScopedTestSystemNSSKeySlot();
31 31
32 bool ConstructedSuccessfully() const; 32 bool ConstructedSuccessfully() const;
33 PK11SlotInfo* slot() const; 33 PK11SlotInfo* slot() const;
34 34
35 private: 35 private:
36 scoped_ptr<ScopedTestNSSDB> test_db_; 36 scoped_ptr<ScopedTestNSSDB> test_db_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(ScopedTestSystemNSSKeySlot); 38 DISALLOW_COPY_AND_ASSIGN(ScopedTestSystemNSSKeySlot);
39 }; 39 };
40 40
41 } // namespace crypto 41 } // namespace crypto
42 42
43 #endif // CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_ 43 #endif // CRYPTO_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_H_
OLDNEW
« no previous file with comments | « crypto/scoped_test_nss_db.h ('k') | sandbox/sandbox_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698