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

Side by Side Diff: chrome/browser/net/nss_slot_factory.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: cert manager basics working 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 | « chrome/browser/net/keygen_handler_nss.cc ('k') | chrome/browser/net/nss_slot_factory.cc » ('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 CHROME_BROWSER_NET_NSS_SLOT_FACTORY_H_
6 #define CHROME_BROWSER_NET_NSS_SLOT_FACTORY_H_
7
8 #include "base/callback.h"
9 #include "crypto/scoped_nss_types.h"
10
11 namespace content {
12 class ResourceContext;
13 }
14 namespace net {
15 class NSSCertDatabase;
16 }
17
18 // XXX how should these interact with tests (should they return the
19 // ScopedTestNSSDB if it's active?)
20
21 // Returns a reference to the public slot for |context|.
22 // Should be called only on the IO thread.
23 crypto::ScopedPK11Slot GetPublicNSSKeySlotForResourceContext(
24 content::ResourceContext* context);
25
26 // Returns a reference to the private slot for |context|.
27 // Should be called only on the IO thread.
28 // May return NULL if the slot is not ready yet.
29 crypto::ScopedPK11Slot GetPrivateNSSKeySlotForResourceContext(
30 content::ResourceContext* context);
31
32 // Runs |callback| with the private slot handle when the private slot is loaded.
33 // If the slot is already loaded, the |callback| will be run synchronously.
34 // Should be called only on the IO thread.
35 void OnPrivateNSSKeySlotForResourceContextReady(
36 content::ResourceContext* context,
37 const base::Callback<void(crypto::ScopedPK11Slot)>& callback);
38
39 // Get a NSSCertDatabase for the given |context|.
40 void GetNSSCertDatabaseForResourceContext(
41 content::ResourceContext* context,
42 const base::Callback<void(net::NSSCertDatabase*)>& callback);
43
44
45 #endif // CHROME_BROWSER_NET_NSS_SLOT_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/keygen_handler_nss.cc ('k') | chrome/browser/net/nss_slot_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698