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

Side by Side Diff: chrome/browser/net/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: more refactoring Created 7 years 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/certificate_manager_model.cc ('k') | chrome/browser/net/nss_context_chromeos.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_NET_NSS_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_NET_NSS_CONTEXT_H_
6 #define CHROME_BROWSER_NET_NSS_CONTEXT_H_ 6 #define CHROME_BROWSER_NET_NSS_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "crypto/scoped_nss_types.h" 12 #include "crypto/scoped_nss_types.h"
13 13
14 namespace net {
15 class NSSCertDatabase;
16 }
17
14 namespace content { 18 namespace content {
15 class ResourceContext; 19 class ResourceContext;
16 } // namespace content 20 } // namespace content
17 21
18 // Returns a reference to the public slot for the user associated with 22 // Returns a reference to the public slot for the user associated with
19 // |context|. Should be called only on the IO thread. 23 // |context|. Should be called only on the IO thread.
20 crypto::ScopedPK11Slot GetPublicNSSKeySlotForResourceContext( 24 crypto::ScopedPK11Slot GetPublicNSSKeySlotForResourceContext(
21 content::ResourceContext* context); 25 content::ResourceContext* context);
22 26
23 // Returns a reference to the private slot for the user associated with 27 // Returns a reference to the private slot for the user associated with
24 // |context|, if it is loaded. If it is not loaded and |callback| is non-null, 28 // |context|, if it is loaded. If it is not loaded and |callback| is non-null,
25 // the |callback| will be run once the slot is loaded. 29 // the |callback| will be run once the slot is loaded.
26 // Should be called only on the IO thread. 30 // Should be called only on the IO thread.
27 crypto::ScopedPK11Slot GetPrivateNSSKeySlotForResourceContext( 31 crypto::ScopedPK11Slot GetPrivateNSSKeySlotForResourceContext(
28 content::ResourceContext* context, 32 content::ResourceContext* context,
29 const base::Callback<void(crypto::ScopedPK11Slot)>& callback) 33 const base::Callback<void(crypto::ScopedPK11Slot)>& callback)
30 WARN_UNUSED_RESULT; 34 WARN_UNUSED_RESULT;
31 35
36 // Get a NSSCertDatabase for the given |context|. Should be called only on the
37 // IO thread.
38 net::NSSCertDatabase* GetNSSCertDatabaseForResourceContext(
39 content::ResourceContext* context,
40 const base::Callback<void(net::NSSCertDatabase*)>& callback)
41 WARN_UNUSED_RESULT;
42
32 #endif // CHROME_BROWSER_NET_NSS_CONTEXT_H_ 43 #endif // CHROME_BROWSER_NET_NSS_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/certificate_manager_model.cc ('k') | chrome/browser/net/nss_context_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698