blob: 61bb2f381845aaeb1037b7195eb7015c6bfc2b4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (c) 2008 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_SCOPED_CERT_CHAIN_CONTEXT_H_
#define NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
#include <windows.h>
#include <wincrypt.h>
#include "base/scoped_ptr.h"
namespace net {
// This class wraps the CertFreeCertificateChain function in a class that can
// be passed as a template argument to scoped_ptr_malloc.
class ScopedPtrMallocFreeCertChain {
public:
void operator()(const CERT_CHAIN_CONTEXT* x) const {
CertFreeCertificateChain(x);
}
};
typedef scoped_ptr_malloc<const CERT_CHAIN_CONTEXT,
ScopedPtrMallocFreeCertChain> ScopedCertChainContext;
} // namespace net
#endif // NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
|