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

Unified Diff: net/spdy/hpack/hpack_static_table.cc

Issue 2832973003: Split net/spdy into core and chromium subdirectories. (Closed)
Patch Set: Fix some more build rules. 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/spdy/hpack/hpack_static_table.h ('k') | net/spdy/hpack/hpack_static_table_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_static_table.cc
diff --git a/net/spdy/hpack/hpack_static_table.cc b/net/spdy/hpack/hpack_static_table.cc
deleted file mode 100644
index cc82985974d2f5163bcdcffd9835ccda4a1e8abf..0000000000000000000000000000000000000000
--- a/net/spdy/hpack/hpack_static_table.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 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.
-
-#include "net/spdy/hpack/hpack_static_table.h"
-
-#include "base/logging.h"
-#include "net/spdy/hpack/hpack_constants.h"
-#include "net/spdy/hpack/hpack_entry.h"
-#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
-#include "net/spdy/platform/api/spdy_string_piece.h"
-
-namespace net {
-
-HpackStaticTable::HpackStaticTable() {}
-
-HpackStaticTable::~HpackStaticTable() {}
-
-void HpackStaticTable::Initialize(const HpackStaticEntry* static_entry_table,
- size_t static_entry_count) {
- CHECK(!IsInitialized());
-
- int total_insertions = 0;
- for (const HpackStaticEntry* it = static_entry_table;
- it != static_entry_table + static_entry_count; ++it) {
- static_entries_.push_back(
- HpackEntry(SpdyStringPiece(it->name, it->name_len),
- SpdyStringPiece(it->value, it->value_len),
- true, // is_static
- total_insertions));
- HpackEntry* entry = &static_entries_.back();
- CHECK(static_index_.insert(entry).second);
- // Multiple static entries may have the same name, so inserts may fail.
- static_name_index_.insert(make_pair(entry->name(), entry));
-
- ++total_insertions;
- }
-}
-
-bool HpackStaticTable::IsInitialized() const {
- return !static_entries_.empty();
-}
-
-size_t HpackStaticTable::EstimateMemoryUsage() const {
- return SpdyEstimateMemoryUsage(static_entries_) +
- SpdyEstimateMemoryUsage(static_index_) +
- SpdyEstimateMemoryUsage(static_name_index_);
-}
-
-} // namespace net
« no previous file with comments | « net/spdy/hpack/hpack_static_table.h ('k') | net/spdy/hpack/hpack_static_table_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698