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

Issue 2132313002: [HttpNetworkSession] Flush socket pools on low memory notification. (Closed)

Created:
4 years, 5 months ago by maksims (do not use this acc)
Modified:
4 years, 5 months ago
Reviewers:
asanka, davidben, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[HttpNetworkSession] Flush socket pools on low memory notification. This cl aims to reduce the number of times chrome is killed when there is not enough memory left (it mostly concerns Android). When there is a low memory notification sent by the memory pressure monitor (either MEMORY_PRESSURE_LEVEL_MODERATE or MEMORY_PRESSURE_LEVEL_CRITICAL), OnMemoryPressure callback is called and idle sockets are flushed. At first I thought to close idle sockets on moderate notifications and use CloseAllConnections() on critical notifications, but after some tests decided to flush idle sockets only, because CloseAllConnections() terminates a transaction and causes failure. + added unit tests. BUG=617719 Committed: https://crrev.com/0adf859e4a1312c56d324503a59959fd85dc8c44 Cr-Commit-Position: refs/heads/master@{#405708}

Patch Set 1 #

Patch Set 2 : returned accidently removed code. #

Total comments: 8

Patch Set 3 : mmenke's comments and rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -0 lines) Patch
M net/http/http_network_session.h View 3 chunks +8 lines, -0 lines 0 comments Download
M net/http/http_network_session.cc View 2 chunks +15 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 1 chunk +136 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
maksims (do not use this acc)
Would somebody take a look into that, please?
4 years, 5 months ago (2016-07-11 11:52:33 UTC) #4
mmenke
https://codereview.chromium.org/2132313002/diff/20001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/2132313002/diff/20001/net/http/http_network_transaction_unittest.cc#newcode6446 net/http/http_network_transaction_unittest.cc:6446: EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); Should be checking the SSL socket pool, ...
4 years, 5 months ago (2016-07-12 18:03:17 UTC) #5
maksims (do not use this acc)
https://codereview.chromium.org/2132313002/diff/20001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/2132313002/diff/20001/net/http/http_network_transaction_unittest.cc#newcode6446 net/http/http_network_transaction_unittest.cc:6446: EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); On 2016/07/12 18:03:17, mmenke wrote: > Should ...
4 years, 5 months ago (2016-07-13 07:45:53 UTC) #6
mmenke
LGTM!
4 years, 5 months ago (2016-07-14 19:06:50 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132313002/60001
4 years, 5 months ago (2016-07-15 05:17:58 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 5 months ago (2016-07-15 06:26:12 UTC) #16
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-15 06:26:19 UTC) #17
commit-bot: I haz the power
4 years, 5 months ago (2016-07-15 06:27:52 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0adf859e4a1312c56d324503a59959fd85dc8c44
Cr-Commit-Position: refs/heads/master@{#405708}

Powered by Google App Engine
This is Rietveld 408576698