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

Unified Diff: crypto/auto_cbb.h

Issue 2408063002: Switch remaining scoped_openssl_types uses to BoringSSL scopers. (Closed)
Patch Set: Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: crypto/auto_cbb.h
diff --git a/crypto/auto_cbb.h b/crypto/auto_cbb.h
deleted file mode 100644
index 5206a214f97cc1be8ddb9622ba27648926cba350..0000000000000000000000000000000000000000
--- a/crypto/auto_cbb.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 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 CRYPTO_AUTO_CBB_H_
-#define CRYPTO_AUTO_CBB_H_
-
-#include <openssl/bytestring.h>
-
-#include "base/macros.h"
-
-namespace crypto {
-
-// AutoCBB is a wrapper over OpenSSL's CBB type that automatically releases
-// resources when going out of scope.
-class AutoCBB {
- public:
- AutoCBB() { CBB_zero(&cbb_); }
- ~AutoCBB() { CBB_cleanup(&cbb_); }
-
- CBB* get() { return &cbb_; }
-
- void Reset() {
- CBB_cleanup(&cbb_);
- CBB_zero(&cbb_);
- }
-
- private:
- CBB cbb_;
- DISALLOW_COPY_AND_ASSIGN(AutoCBB);
-};
-
-} // namespace crypto
-
-#endif // CRYPTO_AUTO_CBB_H_

Powered by Google App Engine
This is Rietveld 408576698