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

Side by Side Diff: crypto/nss_util_internal.h

Issue 426983002: Make crypto::GetSystemNSSKeySlot asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo in comment. 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/nss_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NSS_UTIL_INTERNAL_H_ 5 #ifndef CRYPTO_NSS_UTIL_INTERNAL_H_
6 #define CRYPTO_NSS_UTIL_INTERNAL_H_ 6 #define CRYPTO_NSS_UTIL_INTERNAL_H_
7 7
8 #include <secmodt.h> 8 #include <secmodt.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 AutoSECMODListReadLock(); 41 AutoSECMODListReadLock();
42 ~AutoSECMODListReadLock(); 42 ~AutoSECMODListReadLock();
43 43
44 private: 44 private:
45 SECMODListLock* lock_; 45 SECMODListLock* lock_;
46 DISALLOW_COPY_AND_ASSIGN(AutoSECMODListReadLock); 46 DISALLOW_COPY_AND_ASSIGN(AutoSECMODListReadLock);
47 }; 47 };
48 48
49 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
50 // Returns a reference to the system-wide TPM slot. Caller must release returned 50 // Returns a reference to the system-wide TPM slot if it is loaded. If it is not
51 // reference with PK11_FreeSlot. 51 // loaded and |callback| is non-null, the |callback| will be run once the slot
52 CRYPTO_EXPORT PK11SlotInfo* GetSystemNSSKeySlot() WARN_UNUSED_RESULT; 52 // is loaded.
53 CRYPTO_EXPORT ScopedPK11Slot GetSystemNSSKeySlot(
54 const base::Callback<void(ScopedPK11Slot)>& callback) WARN_UNUSED_RESULT;
53 55
54 // Sets the test system slot. If this was called before 56 // Sets the test system slot. If this was called before
55 // InitializeTPMTokenAndSystemSlot and no system token is provided by the Chaps 57 // InitializeTPMTokenAndSystemSlot and no system token is provided by the Chaps
56 // module, then this test slot will be used and the initialization continues as 58 // module, then this test slot will be used and the initialization continues as
57 // if Chaps had provided this test slot. In particular, |slot| will be exposed 59 // if Chaps had provided this test slot. In particular, |slot| will be exposed
58 // by |GetSystemNSSKeySlot| and |IsTPMTokenReady| will return true. 60 // by |GetSystemNSSKeySlot| and |IsTPMTokenReady| will return true.
59 // This must must not be called consecutively with a |slot| != NULL. If |slot| 61 // This must must not be called consecutively with a |slot| != NULL. If |slot|
60 // is NULL, the test system slot is unset. 62 // is NULL, the test system slot is unset.
61 CRYPTO_EXPORT_PRIVATE void SetSystemKeySlotForTesting(ScopedPK11Slot slot); 63 CRYPTO_EXPORT_PRIVATE void SetSystemKeySlotForTesting(ScopedPK11Slot slot);
62 64
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 106
105 // Closes the NSS DB for |username_hash| that was previously opened by the 107 // Closes the NSS DB for |username_hash| that was previously opened by the
106 // *Initialize*ForChromeOSUser functions. 108 // *Initialize*ForChromeOSUser functions.
107 CRYPTO_EXPORT_PRIVATE void CloseChromeOSUserForTesting( 109 CRYPTO_EXPORT_PRIVATE void CloseChromeOSUserForTesting(
108 const std::string& username_hash); 110 const std::string& username_hash);
109 #endif // defined(OS_CHROMEOS) 111 #endif // defined(OS_CHROMEOS)
110 112
111 } // namespace crypto 113 } // namespace crypto
112 114
113 #endif // CRYPTO_NSS_UTIL_INTERNAL_H_ 115 #endif // CRYPTO_NSS_UTIL_INTERNAL_H_
OLDNEW
« no previous file with comments | « crypto/nss_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698