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

Side by Side Diff: net/quic/core/quic_server_id.cc

Issue 2807493002: Track STL containers in QuicStreamFactory::DumpMemoryStats (Closed)
Patch Set: address zhongyi@ comment 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
« no previous file with comments | « net/quic/core/quic_server_id.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/quic/core/quic_server_id.h" 5 #include "net/quic/core/quic_server_id.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "net/quic/platform/api/quic_estimate_memory_usage.h"
9 #include "net/quic/platform/api/quic_str_cat.h" 10 #include "net/quic/platform/api/quic_str_cat.h"
10 11
11 using std::string; 12 using std::string;
12 13
13 namespace net { 14 namespace net {
14 15
15 QuicServerId::QuicServerId() : privacy_mode_(PRIVACY_MODE_DISABLED) {} 16 QuicServerId::QuicServerId() : privacy_mode_(PRIVACY_MODE_DISABLED) {}
16 17
17 QuicServerId::QuicServerId(const HostPortPair& host_port_pair, 18 QuicServerId::QuicServerId(const HostPortPair& host_port_pair,
18 PrivacyMode privacy_mode) 19 PrivacyMode privacy_mode)
(...skipping 17 matching lines...) Expand all
36 bool QuicServerId::operator==(const QuicServerId& other) const { 37 bool QuicServerId::operator==(const QuicServerId& other) const {
37 return privacy_mode_ == other.privacy_mode_ && 38 return privacy_mode_ == other.privacy_mode_ &&
38 host_port_pair_.Equals(other.host_port_pair_); 39 host_port_pair_.Equals(other.host_port_pair_);
39 } 40 }
40 41
41 string QuicServerId::ToString() const { 42 string QuicServerId::ToString() const {
42 return QuicStrCat("https://", host_port_pair_.ToString(), 43 return QuicStrCat("https://", host_port_pair_.ToString(),
43 (privacy_mode_ == PRIVACY_MODE_ENABLED ? "/private" : "")); 44 (privacy_mode_ == PRIVACY_MODE_ENABLED ? "/private" : ""));
44 } 45 }
45 46
47 size_t QuicServerId::EstimateMemoryUsage() const {
48 return QuicEstimateMemoryUsage(host_port_pair_);
49 }
50
46 } // namespace net 51 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_server_id.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698