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

Unified 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, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_browser.gypi ('k') | crypto/nss_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/nss_context.h
diff --git a/content/public/browser/nss_context.h b/content/public/browser/nss_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c3e07653bfbc98be8f5c95ca508c40f48b8f487
--- /dev/null
+++ b/content/public/browser/nss_context.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_NSS_CONTEXT_H_
+#define CONTENT_PUBLIC_BROWSER_NSS_CONTEXT_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "content/common/content_export.h"
+#include "crypto/scoped_nss_types.h"
+
+namespace net {
+class NSSCertDatabase;
+}
+
+namespace content {
+
+class ResourceContext;
+
+#if defined(OS_CHROMEOS)
+// Set the username hash of the user associated with the given |context|. This
+// should be called during profile initialization.
+CONTENT_EXPORT void SetChromeOSUserForResourceContext(
+ ResourceContext* context,
+ const std::string username_hash);
+
+// Return the username hash of the user associated with the given |context|.
+CONTENT_EXPORT std::string GetChromeOSUserForResourceContext(
+ ResourceContext* context);
+#endif
+
+// Runs |callback| with the private slot handle when the private slot is loaded.
+// If the slot is already loaded, the |callback| will be run synchronously.
+// Should be called only on the IO thread.
+CONTENT_EXPORT void OnPrivateNSSKeySlotForResourceContextReady(
+ ResourceContext* context,
+ const base::Callback<void(crypto::ScopedPK11Slot)>& callback);
+
+// Runs |callback| with the public and private slot handles when the slots are
+// loaded. If the slots are already loaded, the |callback| will be run
+// synchronously. Should be called only on the IO thread.
+CONTENT_EXPORT void OnNSSKeySlotsForResourceContextReady(
+ ResourceContext* context,
+ const base::Callback<
+ void(crypto::ScopedPK11Slot, crypto::ScopedPK11Slot)>& callback);
+
+// Get a NSSCertDatabase for the given |context|. Should be called only on the
+// IO thread.
+CONTENT_EXPORT void GetNSSCertDatabaseForResourceContext(
+ ResourceContext* context,
+ const base::Callback<void(net::NSSCertDatabase*)>& callback);
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_NSS_CONTEXT_H_
« 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