diff options
author | Brian Carlstrom <bdc@google.com> | 2011-02-28 14:56:34 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-06-05 20:40:40 -0700 |
commit | fc1e79c2b539be25f76e40f653d1fcfdf4f6e522 (patch) | |
tree | 9fe68d67e85f1af803a9e398b35dea321e54ca29 /base | |
parent | 8c1c037ed8928fdc3898cfb224291c2f16413dcf (diff) | |
download | external_chromium-fc1e79c2b539be25f76e40f653d1fcfdf4f6e522.zip external_chromium-fc1e79c2b539be25f76e40f653d1fcfdf4f6e522.tar.gz external_chromium-fc1e79c2b539be25f76e40f653d1fcfdf4f6e522.tar.bz2 |
Add ScopedOpenSSL::release like scoped_refptr::release
Change-Id: I1d6c19f12f2b78f95ee1e54015c8e1a02f12c7f1
Diffstat (limited to 'base')
-rw-r--r-- | base/openssl_util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/openssl_util.h b/base/openssl_util.h index 9ce7f81..55f44e6 100644 --- a/base/openssl_util.h +++ b/base/openssl_util.h @@ -7,6 +7,7 @@ #pragma once #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/tracked.h" namespace base { @@ -29,6 +30,11 @@ class ScopedOpenSSL { ptr_ = ptr; } } + T* release() WARN_UNUSED_RESULT { + T* result = ptr_; + ptr_ = NULL; + return result; + } private: T* ptr_; |