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

Side by Side Diff: net/base/scoped_cert_chain_context.h

Issue 7324039: Ensure X509Certificate::OSCertHandles are safe to be used on both UI and IO threads on Win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/certificate_viewer_win.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
6 #define NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
7 #pragma once
8
9 #include <windows.h>
10 #include <wincrypt.h>
11
12 #include "base/memory/scoped_ptr.h"
13
14 namespace net {
15
16 // This class wraps the CertFreeCertificateChain function in a class that can
17 // be passed as a template argument to scoped_ptr_malloc.
18 class ScopedPtrMallocFreeCertChain {
19 public:
20 void operator()(const CERT_CHAIN_CONTEXT* x) const {
21 CertFreeCertificateChain(x);
22 }
23 };
24
25 typedef scoped_ptr_malloc<const CERT_CHAIN_CONTEXT,
26 ScopedPtrMallocFreeCertChain> ScopedCertChainContext;
27
28 } // namespace net
29
30 #endif // NET_BASE_SCOPED_CERT_CHAIN_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/certificate_viewer_win.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698