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

Unified Diff: net/http/http_network_session.cc

Issue 2679903002: Replace OnMemoryStateChange() with OnPurgeMemory() in net/ (Closed)
Patch Set: 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 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 ffa7b261570d0e1c4d17bfc98a34a45ca50d6890..fda084eab56900bcf246229fa108e0e9c72f91f0 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -482,22 +482,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
« no previous file with comments | « net/http/http_network_session.h ('k') | net/sdch/sdch_owner.h » ('j') | net/sdch/sdch_owner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698