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

Unified Diff: net/http/http_network_session.h

Issue 2359723006: Make HttpNetworkSession a client of memory coordinator (Closed)
Patch Set: Address on reviews Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_network_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_session.h
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index 67c884ee41681be0ba033f2684a01ec99c236ead..ed1bd805ecba9a29fbd55ac030886f08e2b6c20e 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -14,6 +14,7 @@
#include <vector>
#include "base/bind.h"
+#include "base/memory/memory_coordinator_client.h"
#include "base/memory/memory_pressure_monitor.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -61,7 +62,8 @@ class TransportSecurityState;
// This class holds session objects used by HttpNetworkTransaction objects.
class NET_EXPORT HttpNetworkSession
- : NON_EXPORTED_BASE(public base::NonThreadSafe) {
+ : NON_EXPORTED_BASE(public base::NonThreadSafe),
+ public base::MemoryCoordinatorClient {
public:
struct NET_EXPORT Params {
Params();
@@ -199,7 +201,7 @@ class NET_EXPORT HttpNetworkSession
};
explicit HttpNetworkSession(const Params& params);
- ~HttpNetworkSession();
+ ~HttpNetworkSession() override;
HttpAuthCache* http_auth_cache() { return &http_auth_cache_; }
SSLClientAuthCache* ssl_client_auth_cache() {
@@ -279,6 +281,9 @@ class NET_EXPORT HttpNetworkSession
void OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
+ // base::MemoryCoordinatorClient implementation:
+ void OnMemoryStateChange(base::MemoryState state) override;
+
NetLog* const net_log_;
HttpServerProperties* const http_server_properties_;
CertVerifier* const cert_verifier_;
« no previous file with comments | « no previous file | net/http/http_network_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698