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

Side by Side Diff: net/spdy/core/hpack/hpack_huffman_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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/hpack/hpack_huffman_table.h" 5 #include "net/spdy/core/hpack/hpack_huffman_table.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/numerics/safe_conversions.h" 12 #include "base/numerics/safe_conversions.h"
13 #include "net/spdy/hpack/hpack_input_stream.h" 13 #include "net/spdy/core/hpack/hpack_input_stream.h"
14 #include "net/spdy/hpack/hpack_output_stream.h" 14 #include "net/spdy/core/hpack/hpack_output_stream.h"
15 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" 15 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
16 16
17 namespace net { 17 namespace net {
18 18
19 namespace { 19 namespace {
20 20
21 // How many bits to index in the root decode table. 21 // How many bits to index in the root decode table.
22 const uint8_t kDecodeTableRootBits = 9; 22 const uint8_t kDecodeTableRootBits = 9;
23 // Maximum number of bits to index in successive decode tables. 23 // Maximum number of bits to index in successive decode tables.
24 const uint8_t kDecodeTableBranchBits = 6; 24 const uint8_t kDecodeTableBranchBits = 6;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 size_t HpackHuffmanTable::EstimateMemoryUsage() const { 319 size_t HpackHuffmanTable::EstimateMemoryUsage() const {
320 return SpdyEstimateMemoryUsage(decode_tables_) + 320 return SpdyEstimateMemoryUsage(decode_tables_) +
321 SpdyEstimateMemoryUsage(decode_entries_) + 321 SpdyEstimateMemoryUsage(decode_entries_) +
322 SpdyEstimateMemoryUsage(code_by_id_) + 322 SpdyEstimateMemoryUsage(code_by_id_) +
323 SpdyEstimateMemoryUsage(length_by_id_); 323 SpdyEstimateMemoryUsage(length_by_id_);
324 } 324 }
325 325
326 } // namespace net 326 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/core/hpack/hpack_huffman_table.h ('k') | net/spdy/core/hpack/hpack_huffman_table_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698