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

Side by Side Diff: net/spdy/hpack/hpack_static_table.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: address bnc comments Created 3 years, 10 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_static_table.h" 5 #include "net/spdy/hpack/hpack_static_table.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/spdy/hpack/hpack_constants.h" 8 #include "net/spdy/hpack/hpack_constants.h"
9 #include "net/spdy/hpack/hpack_entry.h" 9 #include "net/spdy/hpack/hpack_entry.h"
10 10
(...skipping 21 matching lines...) Expand all
32 static_name_index_.insert(make_pair(entry->name(), entry)); 32 static_name_index_.insert(make_pair(entry->name(), entry));
33 33
34 ++total_insertions; 34 ++total_insertions;
35 } 35 }
36 } 36 }
37 37
38 bool HpackStaticTable::IsInitialized() const { 38 bool HpackStaticTable::IsInitialized() const {
39 return !static_entries_.empty(); 39 return !static_entries_.empty();
40 } 40 }
41 41
42 size_t HpackStaticTable::EstimateMemoryUsage() const {
43 // TODO(xunjieli): return the allocation of |static_entries_| when std::deque
44 // is supported in memory_usage_estimator.h. https://crbug.com/669108.
45 return 0;
DmitrySkiba 2017/02/02 18:16:27 This class also has static_index_ and static_name_
xunjieli 2017/02/03 22:25:09 Done.
46 }
47
42 } // namespace net 48 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698