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

Side by Side Diff: net/spdy/core/hpack/hpack_header_table.cc

Issue 2895993003: Misc cleanup in net/spdy/core. (Closed)
Patch Set: Rebase. Created 3 years, 7 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/core/hpack/hpack_header_table.h" 5 #include "net/spdy/core/hpack/hpack_header_table.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/spdy/chromium/spdy_flags.h" 10 #include "net/spdy/chromium/spdy_flags.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 return &dynamic_entries_.front(); 243 return &dynamic_entries_.front();
244 } 244 }
245 245
246 void HpackHeaderTable::DebugLogTableState() const { 246 void HpackHeaderTable::DebugLogTableState() const {
247 DVLOG(2) << "Dynamic table:"; 247 DVLOG(2) << "Dynamic table:";
248 for (EntryTable::const_iterator it = dynamic_entries_.begin(); 248 for (EntryTable::const_iterator it = dynamic_entries_.begin();
249 it != dynamic_entries_.end(); ++it) { 249 it != dynamic_entries_.end(); ++it) {
250 DVLOG(2) << " " << it->GetDebugString(); 250 DVLOG(2) << " " << it->GetDebugString();
251 } 251 }
252 DVLOG(2) << "Full Static Index:"; 252 DVLOG(2) << "Full Static Index:";
253 for (auto* entry : static_index_) { 253 for (const auto* entry : static_index_) {
254 DVLOG(2) << " " << entry->GetDebugString(); 254 DVLOG(2) << " " << entry->GetDebugString();
255 } 255 }
256 DVLOG(2) << "Full Static Name Index:"; 256 DVLOG(2) << "Full Static Name Index:";
257 for (const auto it : static_name_index_) { 257 for (const auto it : static_name_index_) {
258 DVLOG(2) << " " << it.first << ": " << it.second->GetDebugString(); 258 DVLOG(2) << " " << it.first << ": " << it.second->GetDebugString();
259 } 259 }
260 DVLOG(2) << "Full Dynamic Index:"; 260 DVLOG(2) << "Full Dynamic Index:";
261 for (auto* entry : dynamic_index_) { 261 for (const auto* entry : dynamic_index_) {
262 DVLOG(2) << " " << entry->GetDebugString(); 262 DVLOG(2) << " " << entry->GetDebugString();
263 } 263 }
264 DVLOG(2) << "Full Dynamic Name Index:"; 264 DVLOG(2) << "Full Dynamic Name Index:";
265 for (const auto it : dynamic_name_index_) { 265 for (const auto it : dynamic_name_index_) {
266 DVLOG(2) << " " << it.first << ": " << it.second->GetDebugString(); 266 DVLOG(2) << " " << it.first << ": " << it.second->GetDebugString();
267 } 267 }
268 } 268 }
269 269
270 size_t HpackHeaderTable::EstimateMemoryUsage() const { 270 size_t HpackHeaderTable::EstimateMemoryUsage() const {
271 return SpdyEstimateMemoryUsage(dynamic_entries_) + 271 return SpdyEstimateMemoryUsage(dynamic_entries_) +
272 SpdyEstimateMemoryUsage(dynamic_index_) + 272 SpdyEstimateMemoryUsage(dynamic_index_) +
273 SpdyEstimateMemoryUsage(dynamic_name_index_); 273 SpdyEstimateMemoryUsage(dynamic_name_index_);
274 } 274 }
275 275
276 } // namespace net 276 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698