diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-17 00:09:00 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-17 00:09:00 +0000 |
commit | e53c02329933022491988cb58f58423f7a18ba61 (patch) | |
tree | f87bb5be9cabe9d03a370496ab71419e3a43fe88 /crypto/nss_util.h | |
parent | 61e2b8591c6940552fdac1bed5c8787e99f30d97 (diff) | |
download | chromium_src-e53c02329933022491988cb58f58423f7a18ba61.zip chromium_src-e53c02329933022491988cb58f58423f7a18ba61.tar.gz chromium_src-e53c02329933022491988cb58f58423f7a18ba61.tar.bz2 |
Add ClientCertStoreChromeOS which only returns the certs for a given user.
BUG=302125
Review URL: https://codereview.chromium.org/112533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/nss_util.h')
-rw-r--r-- | crypto/nss_util.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crypto/nss_util.h b/crypto/nss_util.h index 4d3d3e2..cf93cb5 100644 --- a/crypto/nss_util.h +++ b/crypto/nss_util.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/files/scoped_temp_dir.h" #include "crypto/crypto_export.h" namespace base { @@ -119,6 +120,26 @@ CRYPTO_EXPORT bool IsTPMTokenReady(const base::Closure& callback) // Initialize the TPM token. Does nothing if it is already initialized. CRYPTO_EXPORT bool InitializeTPMToken(int token_slot_id); + +// Exposed for unittests only. +class CRYPTO_EXPORT_PRIVATE ScopedTestNSSChromeOSUser { + public: + explicit ScopedTestNSSChromeOSUser(const std::string& username_hash); + ~ScopedTestNSSChromeOSUser(); + + std::string username_hash() const { return username_hash_; } + bool constructed_successfully() const { return constructed_successfully_; } + + // Completes initialization of user. Causes any waiting private slot callbacks + // to run. + void FinishInit(); + + private: + const std::string username_hash_; + base::ScopedTempDir temp_dir_; + bool constructed_successfully_; + DISALLOW_COPY_AND_ASSIGN(ScopedTestNSSChromeOSUser); +}; #endif // Convert a NSS PRTime value into a base::Time object. |