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

Unified Diff: net/http/http_network_session.cc

Issue 2648323005: memory coordinator: Add MemoryCoordinatorClient::OnPurgeMemory() (Closed)
Patch Set: Created 3 years, 11 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
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index c49af3be9b43dfc18bca6b70a52a6a51bdd5bf26..4163c18afb6f7a0f3cebf138ed5fa3a7e856c9b2 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -477,22 +477,8 @@ void HttpNetworkSession::OnMemoryPressure(
}
}
-void HttpNetworkSession::OnMemoryStateChange(base::MemoryState state) {
- // TODO(hajimehoshi): When the state changes, adjust the sizes of the caches
- // to reduce the limits. HttpNetworkSession doesn't have the ability to limit
- // at present.
- switch (state) {
- case base::MemoryState::NORMAL:
- break;
- case base::MemoryState::THROTTLED:
- CloseIdleConnections();
- break;
- case base::MemoryState::SUSPENDED:
- // Note: Not supported at present. Fall through.
- case base::MemoryState::UNKNOWN:
- NOTREACHED();
- break;
- }
+void HttpNetworkSession::OnPurgeMemory() {
+ CloseIdleConnections();
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698