Skip to content

Commit

Permalink
Deprecate hpack_table_size flag, remove dead code.
Browse files Browse the repository at this point in the history
This CL lands server changes 148221046, 148224472, and 148645081 by yasong.

BUG=488484

Review-Url: https://codereview.chromium.org/2716393002
Cr-Commit-Position: refs/heads/master@{#453379}
  • Loading branch information
dahollings authored and Commit bot committed Feb 27, 2017
1 parent 2233a4a commit 0d7bfa2
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 224 deletions.
3 changes: 0 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ group("both_gn_and_gyp") {
"//gpu/khronos_glcts_support:khronos_glcts_test",
"//jingle:jingle_unittests",
"//net:hpack_example_generator",
"//net:hpack_fuzz_mutator",
"//net:hpack_fuzz_wrapper",
"//ppapi:ppapi_unittests",
"//ppapi/examples/2d",
"//ppapi/examples/audio",
Expand Down Expand Up @@ -1044,7 +1042,6 @@ if (!is_ios && !is_android && !is_chromecast) {
if (!is_win) {
deps += [
"//net:dns_fuzz_stub",
"//net:hpack_fuzz_wrapper",
"//skia:filter_fuzz_stub",
]
}
Expand Down
32 changes: 0 additions & 32 deletions net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2699,38 +2699,6 @@ if (!is_ios && !is_android) {
]
}

executable("hpack_fuzz_mutator") {
testonly = true
sources = [
"spdy/fuzzing/hpack_fuzz_mutator.cc",
]

# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":net",
"//base",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
]
}

executable("hpack_fuzz_wrapper") {
testonly = true
sources = [
"spdy/fuzzing/hpack_fuzz_wrapper.cc",
]

# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":net",
"//base",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
]
}

if (use_v8_in_net) {
executable("net_watcher") {
testonly = true
Expand Down
80 changes: 0 additions & 80 deletions net/spdy/fuzzing/hpack_fuzz_mutator.cc

This file was deleted.

59 changes: 0 additions & 59 deletions net/spdy/fuzzing/hpack_fuzz_wrapper.cc

This file was deleted.

8 changes: 1 addition & 7 deletions net/spdy/hpack/hpack_header_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,7 @@ void HpackHeaderTable::SetMaxSize(size_t max_size) {

void HpackHeaderTable::SetSettingsHeaderTableSize(size_t settings_size) {
settings_size_bound_ = settings_size;
if (!FLAGS_chromium_reloadable_flag_increase_hpack_table_size) {
if (settings_size_bound_ < max_size_) {
SetMaxSize(settings_size_bound_);
}
} else {
SetMaxSize(settings_size_bound_);
}
SetMaxSize(settings_size_bound_);
}

void HpackHeaderTable::EvictionSet(StringPiece name,
Expand Down
37 changes: 0 additions & 37 deletions net/spdy/hpack/hpack_header_table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ TEST_F(HpackHeaderTableTest, EntryIndexing) {
}

TEST_F(HpackHeaderTableTest, SetSizes) {
FLAGS_chromium_reloadable_flag_increase_hpack_table_size = true;
string key = "key", value = "value";
const HpackEntry* entry1 = table_.TryAddEntry(key, value);
const HpackEntry* entry2 = table_.TryAddEntry(key, value);
Expand Down Expand Up @@ -291,42 +290,6 @@ TEST_F(HpackHeaderTableTest, SetSizes) {
EXPECT_EQ(0u, peer_.dynamic_entries().size());
}

TEST_F(HpackHeaderTableTest, SetSizesOld) {
FLAGS_chromium_reloadable_flag_increase_hpack_table_size = false;

string key = "key", value = "value";
const HpackEntry* entry1 = table_.TryAddEntry(key, value);
const HpackEntry* entry2 = table_.TryAddEntry(key, value);
const HpackEntry* entry3 = table_.TryAddEntry(key, value);

// Set exactly large enough. No Evictions.
size_t max_size = entry1->Size() + entry2->Size() + entry3->Size();
table_.SetMaxSize(max_size);
EXPECT_EQ(3u, peer_.dynamic_entries().size());

// Set just too small. One eviction.
max_size = entry1->Size() + entry2->Size() + entry3->Size() - 1;
table_.SetMaxSize(max_size);
EXPECT_EQ(2u, peer_.dynamic_entries().size());

// Changing SETTINGS_HEADER_TABLE_SIZE doesn't affect table_.max_size(),
// iff SETTINGS_HEADER_TABLE_SIZE >= |max_size|.
EXPECT_EQ(kDefaultHeaderTableSizeSetting, table_.settings_size_bound());
table_.SetSettingsHeaderTableSize(kDefaultHeaderTableSizeSetting * 2);
EXPECT_EQ(max_size, table_.max_size());
table_.SetSettingsHeaderTableSize(max_size + 1);
EXPECT_EQ(max_size, table_.max_size());
EXPECT_EQ(2u, peer_.dynamic_entries().size());

// SETTINGS_HEADER_TABLE_SIZE upper-bounds |table_.max_size()|,
// and will force evictions.
max_size = entry3->Size() - 1;
table_.SetSettingsHeaderTableSize(max_size);
EXPECT_EQ(max_size, table_.max_size());
EXPECT_EQ(max_size, table_.settings_size_bound());
EXPECT_EQ(0u, peer_.dynamic_entries().size());
}

TEST_F(HpackHeaderTableTest, EvictionCountForEntry) {
string key = "key", value = "value";
const HpackEntry* entry1 = table_.TryAddEntry(key, value);
Expand Down
4 changes: 0 additions & 4 deletions net/spdy/spdy_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ bool FLAGS_chromium_http2_flag_spdy_use_hpack_decoder2 = false;
// Use //net/http2/hpack/decoder as complete HPACK decoder.
bool FLAGS_chromium_http2_flag_spdy_use_hpack_decoder3 = true;

// If true, increase HPACK table size up to optimal size kOptTableSize if
// clients allow it.
bool FLAGS_chromium_reloadable_flag_increase_hpack_table_size = false;

// Use Http2FrameDecoderAdapter.
// TODO(jamessynge): Remove flag once no longer set by scripts.
bool FLAGS_chromium_http2_flag_spdy_use_http2_frame_decoder_adapter = false;
Expand Down
2 changes: 0 additions & 2 deletions net/spdy/spdy_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ NET_EXPORT_PRIVATE extern bool
FLAGS_chromium_http2_flag_spdy_use_hpack_decoder2;
NET_EXPORT_PRIVATE extern bool
FLAGS_chromium_http2_flag_spdy_use_hpack_decoder3;
NET_EXPORT_PRIVATE extern bool
FLAGS_chromium_reloadable_flag_increase_hpack_table_size;
NET_EXPORT_PRIVATE extern bool FLAGS_use_http2_frame_decoder_adapter;
NET_EXPORT_PRIVATE extern bool FLAGS_use_nested_spdy_framer_decoder;
NET_EXPORT_PRIVATE extern bool
Expand Down

0 comments on commit 0d7bfa2

Please sign in to comment.