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

Side by Side Diff: base/nss_util.h

Issue 6667020: This change loads opencryptoki and uses the TPM for keygen tags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes Created 9 years, 9 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 | « no previous file | base/nss_util.cc » ('j') | base/nss_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 BASE_NSS_UTIL_H_ 5 #ifndef BASE_NSS_UTIL_H_
6 #define BASE_NSS_UTIL_H_ 6 #define BASE_NSS_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
wtc 2011/03/17 19:34:22 Nit: please add a blank line to separate C++ syste
9 #include "base/basictypes.h" 10 #include "base/basictypes.h"
10 11
11 #if defined(USE_NSS) 12 #if defined(USE_NSS)
12 class FilePath; 13 class FilePath;
13 #endif // defined(USE_NSS) 14 #endif // defined(USE_NSS)
14 15
15 // This file specifically doesn't depend on any NSS or NSPR headers because it 16 // This file specifically doesn't depend on any NSS or NSPR headers because it
16 // is included by various (non-crypto) parts of chrome to call the 17 // is included by various (non-crypto) parts of chrome to call the
17 // initialization functions. 18 // initialization functions.
18 namespace base { 19 namespace base {
(...skipping 18 matching lines...) Expand all
37 // ever be initialized once. NSS will be properly shut down on program exit. 38 // ever be initialized once. NSS will be properly shut down on program exit.
38 void EnsureNSSInit(); 39 void EnsureNSSInit();
39 40
40 // Check if the current NSS version is greater than or equals to |version|. 41 // Check if the current NSS version is greater than or equals to |version|.
41 // A sample version string is "3.12.3". 42 // A sample version string is "3.12.3".
42 bool CheckNSSVersion(const char* version); 43 bool CheckNSSVersion(const char* version);
43 44
44 #if defined(OS_CHROMEOS) 45 #if defined(OS_CHROMEOS)
45 // Open the r/w nssdb that's stored inside the user's encrypted home directory. 46 // Open the r/w nssdb that's stored inside the user's encrypted home directory.
46 void OpenPersistentNSSDB(); 47 void OpenPersistentNSSDB();
48
49 // Get name for the built-in TPM token on ChromeOS.
50 std::string GetTPMTokenName();
47 #endif 51 #endif
48 52
49 // Convert a NSS PRTime value into a base::Time object. 53 // Convert a NSS PRTime value into a base::Time object.
50 // We use a int64 instead of PRTime here to avoid depending on NSPR headers. 54 // We use a int64 instead of PRTime here to avoid depending on NSPR headers.
51 Time PRTimeToBaseTime(int64 prtime); 55 Time PRTimeToBaseTime(int64 prtime);
52 56
53 #if defined(USE_NSS) 57 #if defined(USE_NSS)
54 // Exposed for unittests only. |path| should be an existing directory under 58 // Exposed for unittests only. |path| should be an existing directory under
55 // which the DB files will be placed. |description| is a user-visible name for 59 // which the DB files will be placed. |description| is a user-visible name for
56 // the DB, as a utf8 string, which will be truncated at 32 bytes. 60 // the DB, as a utf8 string, which will be truncated at 32 bytes.
(...skipping 19 matching lines...) Expand all
76 private: 80 private:
77 Lock *lock_; 81 Lock *lock_;
78 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); 82 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock);
79 }; 83 };
80 84
81 #endif // defined(USE_NSS) 85 #endif // defined(USE_NSS)
82 86
83 } // namespace base 87 } // namespace base
84 88
85 #endif // BASE_NSS_UTIL_H_ 89 #endif // BASE_NSS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/nss_util.cc » ('j') | base/nss_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698