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

Unified Diff: net/base/pk11_slot.h

Issue 5686002: NSS: PKCS 11 password prompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
Index: net/base/pk11_slot.h
diff --git a/net/base/pk11_slot.h b/net/base/pk11_slot.h
new file mode 100644
index 0000000000000000000000000000000000000000..da2ae036c8a87dbf47efab0d1d908d0b32dfaa0e
--- /dev/null
+++ b/net/base/pk11_slot.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2010 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 NET_BASE_PK11_SLOT_H_
+#define NET_BASE_PK11_SLOT_H_
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include "base/ref_counted.h"
+
+#if defined(USE_NSS)
+typedef struct PK11SlotInfoStr PK11SlotInfo;
+#endif
+
+namespace net {
+
+class PK11Slot;
+
+typedef std::vector<scoped_refptr<PK11Slot> > PK11SlotList;
+
+class PK11Slot : public base::RefCountedThreadSafe<PK11Slot> {
wtc 2010/12/15 20:54:36 PK11Slot may not need to be ref-counted.
+ public:
+#if defined(USE_NSS)
+ typedef PK11SlotInfo* OSSlotHandle;
+#else
+ typedef void* OSSlotHandle;
+#endif
+
+ OSSlotHandle os_slot_handle() const { return slot_handle_; }
+
+ std::string GetTokenName() const;
+
+ static PK11Slot* CreateFromHandle(OSSlotHandle handle);
+
+ private:
+ friend class base::RefCountedThreadSafe<PK11Slot>;
+
+ explicit PK11Slot(OSSlotHandle handle);
+ ~PK11Slot();
+
+ OSSlotHandle slot_handle_;
+
+ DISALLOW_COPY_AND_ASSIGN(PK11Slot);
+};
+
+} // namespace net
+
+#endif // NET_BASE_PK11_SLOT_H_

Powered by Google App Engine
This is Rietveld 408576698