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

Side by Side Diff: chrome/browser/net/nss_context.h

Issue 135193007: Use user specific NSSDatabase in CertLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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
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 class Profile;
15
14 namespace net { 16 namespace net {
15 class NSSCertDatabase; 17 class NSSCertDatabase;
16 } 18 }
17 19
18 namespace content { 20 namespace content {
19 class ResourceContext; 21 class ResourceContext;
20 } // namespace content 22 } // namespace content
21 23
22 // Returns a reference to the public slot for the user associated with 24 // Returns a reference to the public slot for the user associated with
23 // |context|. Should be called only on the IO thread. 25 // |context|. Should be called only on the IO thread.
(...skipping 13 matching lines...) Expand all
37 // |context|, if it is ready. If it is not ready and |callback| is non-null, the 39 // |context|, if it is ready. If it is not ready and |callback| is non-null, the
38 // |callback| will be run once the DB is initialized. Ownership is not 40 // |callback| will be run once the DB is initialized. Ownership is not
39 // transferred, but the caller may save the pointer, which will remain valid for 41 // transferred, but the caller may save the pointer, which will remain valid for
40 // the lifetime of the ResourceContext. 42 // the lifetime of the ResourceContext.
41 // Should be called only on the IO thread. 43 // Should be called only on the IO thread.
42 net::NSSCertDatabase* GetNSSCertDatabaseForResourceContext( 44 net::NSSCertDatabase* GetNSSCertDatabaseForResourceContext(
43 content::ResourceContext* context, 45 content::ResourceContext* context,
44 const base::Callback<void(net::NSSCertDatabase*)>& callback) 46 const base::Callback<void(net::NSSCertDatabase*)>& callback)
45 WARN_UNUSED_RESULT; 47 WARN_UNUSED_RESULT;
46 48
49 // Gets a pointer to the NSSCertDatabase for the user associated with |context|.
50 // It's a wrapper around |GetNSSCertDatabaseForResourceContext| which makes
51 // sure it's called on IO thread (with |profile|'s resource context). The
52 // callback will be called on the originating message loop.
53 // It's accessing profile, so it should be called on the UI thread.
54 void GetNSSCertDatabaseForProfile(
55 Profile* profile,
56 const base::Callback<void(net::NSSCertDatabase*)>& callback);
57
47 #endif // CHROME_BROWSER_NET_NSS_CONTEXT_H_ 58 #endif // CHROME_BROWSER_NET_NSS_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/device_settings_service_unittest.cc ('k') | chrome/browser/net/nss_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698