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

Side by Side Diff: net/spdy/http2_priority_dependencies.cc

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)
Patch Set: rebased 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
« no previous file with comments | « net/spdy/http2_priority_dependencies.h ('k') | net/spdy/spdy_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/http2_priority_dependencies.h" 5 #include "net/spdy/http2_priority_dependencies.h"
6 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
6 7
7 namespace net { 8 namespace net {
8 9
9 Http2PriorityDependencies::Http2PriorityDependencies() {} 10 Http2PriorityDependencies::Http2PriorityDependencies() {}
10 11
11 Http2PriorityDependencies::~Http2PriorityDependencies() {} 12 Http2PriorityDependencies::~Http2PriorityDependencies() {}
12 13
13 void Http2PriorityDependencies::OnStreamCreation( 14 void Http2PriorityDependencies::OnStreamCreation(
14 SpdyStreamId id, 15 SpdyStreamId id,
15 SpdyPriority priority, 16 SpdyPriority priority,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 void Http2PriorityDependencies::OnStreamDestruction(SpdyStreamId id) { 152 void Http2PriorityDependencies::OnStreamDestruction(SpdyStreamId id) {
152 EntryMap::iterator emit = entry_by_stream_id_.find(id); 153 EntryMap::iterator emit = entry_by_stream_id_.find(id);
153 DCHECK(emit != entry_by_stream_id_.end()); 154 DCHECK(emit != entry_by_stream_id_.end());
154 155
155 IdList::iterator it = emit->second; 156 IdList::iterator it = emit->second;
156 id_priority_lists_[it->second].erase(it); 157 id_priority_lists_[it->second].erase(it);
157 entry_by_stream_id_.erase(emit); 158 entry_by_stream_id_.erase(emit);
158 } 159 }
159 160
161 size_t Http2PriorityDependencies::EstimateMemoryUsage() const {
162 return SpdyEstimateMemoryUsage(id_priority_lists_);
163 // TODO(xunjieli): https://crbug.com/690015. Include |entry_by_stream_id_|
164 // when memory_usage_estimator.h supports std::list::iterator.
165 }
166
160 } // namespace net 167 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/http2_priority_dependencies.h ('k') | net/spdy/spdy_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698