| Index: net/base/pk11_slot_nss.cc
|
| diff --git a/net/base/pk11_slot_nss.cc b/net/base/pk11_slot_nss.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3611ee477c8eacdca54ed3598360700da5544883
|
| --- /dev/null
|
| +++ b/net/base/pk11_slot_nss.cc
|
| @@ -0,0 +1,28 @@
|
| +// 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.
|
| +
|
| +#include "net/base/pk11_slot.h"
|
| +
|
| +#include <pk11pub.h>
|
| +
|
| +namespace net {
|
| +
|
| +std::string PK11Slot::GetTokenName() const {
|
| + return PK11_GetTokenName(slot_handle_);
|
| +}
|
| +
|
| +// static
|
| +PK11Slot* PK11Slot::CreateFromHandle(OSSlotHandle handle) {
|
| + return new PK11Slot(handle);
|
| +}
|
| +
|
| +PK11Slot::PK11Slot(OSSlotHandle handle) : slot_handle_(handle) {
|
| + PK11_ReferenceSlot(slot_handle_);
|
| +}
|
| +
|
| +PK11Slot::~PK11Slot() {
|
| + PK11_FreeSlot(slot_handle_);
|
| +}
|
| +
|
| +} // namespace net
|
|
|