Commit 54906703 authored by Bence Béky's avatar Bence Béky Committed by Commit Bot

Change DecodeAndValidateSeveralWays() argument to const ref.

This CL lands server changes 163065386 by clshepherd
and 164147233 by bnc.

BUG=488484

Change-Id: I2dd1d319e3221cc1ab356a04b6bf60374870fd83
Reviewed-on: https://chromium-review.googlesource.com/600732
Commit-Queue: Bence Béky <bnc@chromium.org>
Reviewed-by: default avatarHelen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491910}
parent 3e137a53
......@@ -4,6 +4,9 @@
#include "net/http2/hpack/decoder/hpack_block_decoder.h"
#include <cstdint>
#include <strstream>
// Tests of HpackBlockDecoder.
#include <sstream>
......@@ -53,14 +56,14 @@ class HpackBlockDecoderTest : public RandomDecoderTest {
}
AssertionResult DecodeAndValidateSeveralWays(DecodeBuffer* db,
Validator validator) {
const Validator& validator) {
bool return_non_zero_on_first = false;
return RandomDecoderTest::DecodeAndValidateSeveralWays(
db, return_non_zero_on_first, validator);
}
AssertionResult DecodeAndValidateSeveralWays(const HpackBlockBuilder& hbb,
Validator validator) {
const Validator& validator) {
DecodeBuffer db(hbb.buffer());
return DecodeAndValidateSeveralWays(&db, validator);
}
......
......@@ -4,6 +4,8 @@
#include "net/http2/hpack/decoder/hpack_entry_decoder.h"
#include <cstdint>
// Tests of HpackEntryDecoder.
#include "net/http2/hpack/decoder/hpack_entry_collector.h"
......@@ -34,7 +36,7 @@ class HpackEntryDecoderTest : public RandomDecoderTest {
}
AssertionResult DecodeAndValidateSeveralWays(DecodeBuffer* db,
Validator validator) {
const Validator& validator) {
// StartDecoding, above, requires the DecodeBuffer be non-empty so that it
// can call Start with the prefix byte.
bool return_non_zero_on_first = true;
......@@ -43,7 +45,7 @@ class HpackEntryDecoderTest : public RandomDecoderTest {
}
AssertionResult DecodeAndValidateSeveralWays(const HpackBlockBuilder& hbb,
Validator validator) {
const Validator& validator) {
DecodeBuffer db(hbb.buffer());
return DecodeAndValidateSeveralWays(&db, validator);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment