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

Unified Diff: net/spdy/core/fuzzing/hpack_fuzz_util.cc

Issue 2840563003: Implement SpdyMakeUnique and SpdyWrapUnique. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « net/BUILD.gn ('k') | net/spdy/core/hpack/hpack_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/core/fuzzing/hpack_fuzz_util.cc
diff --git a/net/spdy/core/fuzzing/hpack_fuzz_util.cc b/net/spdy/core/fuzzing/hpack_fuzz_util.cc
index 11d8c542bad8f4a2c5d16eca0d2a1967784c30d7..dca92bb3ae549f32210295217cf1a4dff6a5e9fd 100644
--- a/net/spdy/core/fuzzing/hpack_fuzz_util.cc
+++ b/net/spdy/core/fuzzing/hpack_fuzz_util.cc
@@ -10,6 +10,7 @@
#include "base/rand_util.h"
#include "base/sys_byteorder.h"
#include "net/spdy/core/hpack/hpack_constants.h"
+#include "net/spdy/platform/api/spdy_ptr_util.h"
namespace net {
@@ -138,9 +139,10 @@ SpdyString HpackFuzzUtil::HeaderBlockPrefix(size_t block_size) {
// static
void HpackFuzzUtil::InitializeFuzzerContext(FuzzerContext* context) {
- context->first_stage.reset(new HpackDecoder());
- context->second_stage.reset(new HpackEncoder(ObtainHpackHuffmanTable()));
- context->third_stage.reset(new HpackDecoder());
+ context->first_stage = SpdyMakeUnique<HpackDecoder>();
+ context->second_stage =
+ SpdyMakeUnique<HpackEncoder>(ObtainHpackHuffmanTable());
+ context->third_stage = SpdyMakeUnique<HpackDecoder>();
}
// static
« no previous file with comments | « net/BUILD.gn ('k') | net/spdy/core/hpack/hpack_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698