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

Side by Side Diff: net/quic/chromium/quic_stream_factory_test.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/chromium/quic_stream_factory.cc ('k') | net/quic/core/quic_server_id.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <ostream> 8 #include <ostream>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
14 #include "base/run_loop.h" 15 #include "base/run_loop.h"
15 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
16 #include "net/base/test_proxy_delegate.h" 17 #include "net/base/test_proxy_delegate.h"
17 #include "net/cert/cert_verifier.h" 18 #include "net/cert/cert_verifier.h"
18 #include "net/cert/ct_policy_enforcer.h" 19 #include "net/cert/ct_policy_enforcer.h"
19 #include "net/cert/multi_log_ct_verifier.h" 20 #include "net/cert/multi_log_ct_verifier.h"
20 #include "net/dns/mock_host_resolver.h" 21 #include "net/dns/mock_host_resolver.h"
21 #include "net/http/http_response_headers.h" 22 #include "net/http/http_response_headers.h"
22 #include "net/http/http_response_info.h" 23 #include "net/http/http_response_info.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 189
189 void CancelWaitForDataReadyCallback() override {} 190 void CancelWaitForDataReadyCallback() override {}
190 191
191 bool IsDataReady() override { return false; } 192 bool IsDataReady() override { return false; }
192 193
193 bool IsReadyToPersist() override { return false; } 194 bool IsReadyToPersist() override { return false; }
194 195
195 void Persist() override {} 196 void Persist() override {}
196 197
197 void OnExternalCacheHit() override {} 198 void OnExternalCacheHit() override {}
199
200 size_t EstimateMemoryUsage() const override {
201 NOTREACHED();
202 return 0;
203 }
198 }; 204 };
199 205
200 class MockQuicServerInfoFactory : public QuicServerInfoFactory { 206 class MockQuicServerInfoFactory : public QuicServerInfoFactory {
201 public: 207 public:
202 MockQuicServerInfoFactory() {} 208 MockQuicServerInfoFactory() {}
203 ~MockQuicServerInfoFactory() override {} 209 ~MockQuicServerInfoFactory() override {}
204 210
205 std::unique_ptr<QuicServerInfo> GetForServer( 211 std::unique_ptr<QuicServerInfo> GetForServer(
206 const QuicServerId& server_id) override { 212 const QuicServerId& server_id) override {
207 return base::MakeUnique<MockQuicServerInfo>(server_id); 213 return base::MakeUnique<MockQuicServerInfo>(server_id);
(...skipping 5338 matching lines...) Expand 10 before | Expand all | Expand 10 after
5546 // Clear all cached states. 5552 // Clear all cached states.
5547 factory_->ClearCachedStatesInCryptoConfig( 5553 factory_->ClearCachedStatesInCryptoConfig(
5548 base::Callback<bool(const GURL&)>()); 5554 base::Callback<bool(const GURL&)>());
5549 EXPECT_TRUE(test_cases[0].state->certs().empty()); 5555 EXPECT_TRUE(test_cases[0].state->certs().empty());
5550 EXPECT_TRUE(test_cases[1].state->certs().empty()); 5556 EXPECT_TRUE(test_cases[1].state->certs().empty());
5551 EXPECT_TRUE(test_cases[2].state->certs().empty()); 5557 EXPECT_TRUE(test_cases[2].state->certs().empty());
5552 } 5558 }
5553 5559
5554 } // namespace test 5560 } // namespace test
5555 } // namespace net 5561 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_stream_factory.cc ('k') | net/quic/core/quic_server_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698