Chromium Code Reviews| Index: base/openssl_util.h |
| diff --git a/base/openssl_util.h b/base/openssl_util.h |
| index 4f564cf6c23b35173ccabc2400010371691d36b7..ae69096baa11ec99194a82f7ccb45a9bead9b572 100644 |
| --- a/base/openssl_util.h |
| +++ b/base/openssl_util.h |
| @@ -7,6 +7,7 @@ |
| #pragma once |
| #include "base/basictypes.h" |
| +#include "base/tracked.h" |
| namespace base { |
| @@ -46,8 +47,26 @@ class ScopedOpenSSLSafeSizeBuffer { |
| // Temporary buffer writen into in the case where the caller's |
| // buffer is not of sufficient size. |
| unsigned char min_sized_buffer_[MIN_SIZE]; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLSafeSizeBuffer); |
| +}; |
| + |
| +// Drains the OpenSSL ERR_get_error stack. On a debug build the error codes |
| +// are send to VLOG(1), on a release build they are disregarded. |
| +// Pass FROM_HERE as the parameter. |
|
Ryan Sleevi
2010/11/11 18:07:15
What parameter?
joth
2010/11/11 19:54:36
Opps, removed.
|
| +void ClearERRStack(); |
| + |
| +// Put an instance of this class on the call stack to automatically clear the |
| +// OpenSSL error stack on exit of your function. |
| +class ScopedERRStackClearer { |
| + public: |
| + ScopedERRStackClearer() {} |
| + ~ScopedERRStackClearer() { ClearERRStack(); } |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ScopedERRStackClearer); |
| }; |
| } // namespace base |
| -#endif // BASE_NSS_UTIL_H_ |
| +#endif // BASE_OPENNSSL_UTIL_H_ |