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

Side by Side Diff: net/http/http_cache_transaction.h

Issue 2661333002: Track SimpleCache memory usage in net/ MemoryDumpProvider (Closed)
Patch Set: Address jkarlin@ 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 (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 // This file declares HttpCache::Transaction, a private class of HttpCache so 5 // This file declares HttpCache::Transaction, a private class of HttpCache so
6 // it should only be included by http_cache.cc 6 // it should only be included by http_cache.cc
7 7
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void SetPriority(RequestPriority priority) override; 157 void SetPriority(RequestPriority priority) override;
158 void SetWebSocketHandshakeStreamCreateHelper( 158 void SetWebSocketHandshakeStreamCreateHelper(
159 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; 159 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override;
160 void SetBeforeNetworkStartCallback( 160 void SetBeforeNetworkStartCallback(
161 const BeforeNetworkStartCallback& callback) override; 161 const BeforeNetworkStartCallback& callback) override;
162 void SetBeforeHeadersSentCallback( 162 void SetBeforeHeadersSentCallback(
163 const BeforeHeadersSentCallback& callback) override; 163 const BeforeHeadersSentCallback& callback) override;
164 int ResumeNetworkStart() override; 164 int ResumeNetworkStart() override;
165 void GetConnectionAttempts(ConnectionAttempts* out) const override; 165 void GetConnectionAttempts(ConnectionAttempts* out) const override;
166 166
167 // Returns the estimate of dynamically allocated memory in bytes.
168 size_t EstimateMemoryUsage() const;
169
167 private: 170 private:
168 static const size_t kNumValidationHeaders = 2; 171 static const size_t kNumValidationHeaders = 2;
169 // Helper struct to pair a header name with its value, for 172 // Helper struct to pair a header name with its value, for
170 // headers used to validate cache entries. 173 // headers used to validate cache entries.
171 struct ValidationHeaders { 174 struct ValidationHeaders {
172 ValidationHeaders() : initialized(false) {} 175 ValidationHeaders() : initialized(false) {}
173 176
174 std::string values[kNumValidationHeaders]; 177 std::string values[kNumValidationHeaders];
175 bool initialized; 178 bool initialized;
176 }; 179 };
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 BeforeHeadersSentCallback before_headers_sent_callback_; 507 BeforeHeadersSentCallback before_headers_sent_callback_;
505 508
506 base::WeakPtrFactory<Transaction> weak_factory_; 509 base::WeakPtrFactory<Transaction> weak_factory_;
507 510
508 DISALLOW_COPY_AND_ASSIGN(Transaction); 511 DISALLOW_COPY_AND_ASSIGN(Transaction);
509 }; 512 };
510 513
511 } // namespace net 514 } // namespace net
512 515
513 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 516 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698