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

Side by Side Diff: content/public/browser/nss_context.h

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: certdb: handle GetCertTrust and IsUntrusted, failed attempt to handle SetCertTrust Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/content_browser.gypi ('k') | crypto/nss_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_NSS_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_NSS_CONTEXT_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "content/common/content_export.h"
12 #include "crypto/scoped_nss_types.h"
13
14 namespace net {
15 class NSSCertDatabase;
16 }
17
18 namespace content {
19
20 class ResourceContext;
21
22 #if defined(OS_CHROMEOS)
23 // Set the username hash of the user associated with the given |context|. This
24 // should be called during profile initialization.
25 CONTENT_EXPORT void SetChromeOSUserForResourceContext(
26 ResourceContext* context,
27 const std::string username_hash);
28
29 // Return the username hash of the user associated with the given |context|.
30 CONTENT_EXPORT std::string GetChromeOSUserForResourceContext(
31 ResourceContext* context);
32 #endif
33
34 // Runs |callback| with the private slot handle when the private slot is loaded.
35 // If the slot is already loaded, the |callback| will be run synchronously.
36 // Should be called only on the IO thread.
37 CONTENT_EXPORT void OnPrivateNSSKeySlotForResourceContextReady(
38 ResourceContext* context,
39 const base::Callback<void(crypto::ScopedPK11Slot)>& callback);
40
41 // Runs |callback| with the public and private slot handles when the slots are
42 // loaded. If the slots are already loaded, the |callback| will be run
43 // synchronously. Should be called only on the IO thread.
44 CONTENT_EXPORT void OnNSSKeySlotsForResourceContextReady(
45 ResourceContext* context,
46 const base::Callback<
47 void(crypto::ScopedPK11Slot, crypto::ScopedPK11Slot)>& callback);
48
49 // Get a NSSCertDatabase for the given |context|. Should be called only on the
50 // IO thread.
51 CONTENT_EXPORT void GetNSSCertDatabaseForResourceContext(
52 ResourceContext* context,
53 const base::Callback<void(net::NSSCertDatabase*)>& callback);
54
55 } // namespace content
56
57 #endif // CONTENT_PUBLIC_BROWSER_NSS_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | crypto/nss_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698