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

Issue 2867353002: memory coordinator: Introduce MemoryCoordinatorImpl::Policy (Closed)

Created:
3 years, 7 months ago by bashi
Modified:
3 years, 7 months ago
Reviewers:
haraken, kinuko, chrome-grc-reviews+memory, chrisha
CC:
chromium-reviews, jam, chrome-grc-reviews+memory_chromium.org, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

memory coordinator: Introduce MemoryCoordinatorImpl::Policy Proper actions under memory pressure can vary on different systems. Use a strategy pattern to make policies interchangeable. This CL just moves the current heuristics to MemoryCoordinatorDefaultPolicy. Design doc: https://docs.google.com/document/d/1rGeUzhfzIKwmBzUcqUEwxEpLQQRq3PulRuHwFBlVIYI/edit#heading=h.12ebay6zfsdw BUG=696844 Review-Url: https://codereview.chromium.org/2867353002 Cr-Commit-Position: refs/heads/master@{#471260} Committed: https://chromium.googlesource.com/chromium/src/+/c5106fdfb45ca1c85f5018dfbf0989d3c97db323

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove GetChildMemoryState() #

Patch Set 3 : Tweak #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -243 lines) Patch
M content/browser/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
A content/browser/memory/memory_coordinator_default_policy.h View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
A content/browser/memory/memory_coordinator_default_policy.cc View 1 2 1 chunk +121 lines, -0 lines 0 comments Download
M content/browser/memory/memory_coordinator_impl.h View 1 7 chunks +50 lines, -50 lines 1 comment Download
M content/browser/memory/memory_coordinator_impl.cc View 1 10 chunks +73 lines, -173 lines 0 comments Download
M content/browser/memory/memory_coordinator_impl_unittest.cc View 1 2 11 chunks +23 lines, -20 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
bashi
I'd like to get some feedback. WDYT? Any other good separation/abstraction?
3 years, 7 months ago (2017-05-09 09:30:14 UTC) #4
haraken
The approach looks good. Is this ready for full review? https://codereview.chromium.org/2867353002/diff/1/content/browser/memory/memory_coordinator_default_policy.h File content/browser/memory/memory_coordinator_default_policy.h (right): https://codereview.chromium.org/2867353002/diff/1/content/browser/memory/memory_coordinator_default_policy.h#newcode15 ...
3 years, 7 months ago (2017-05-09 11:47:30 UTC) #5
chrisha
+1 to the approach, seems like a good abstraction point.
3 years, 7 months ago (2017-05-09 18:53:01 UTC) #7
bashi
Thanks haraken-san and Chris. PS#2 is ready for review. (I was trying to tweak some ...
3 years, 7 months ago (2017-05-12 01:53:16 UTC) #10
haraken
LGTM. I'm assuming that you're not making any functional change.
3 years, 7 months ago (2017-05-12 04:06:08 UTC) #13
bashi
+kinuko@: could you review content/browser/ ?
3 years, 7 months ago (2017-05-12 07:09:14 UTC) #15
kinuko
lgtm
3 years, 7 months ago (2017-05-12 07:45:25 UTC) #16
bashi
Thank you!
3 years, 7 months ago (2017-05-12 09:32:00 UTC) #17
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/2867353002/40001
3 years, 7 months ago (2017-05-12 09:32:25 UTC) #19
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 09:38:52 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/c5106fdfb45ca1c85f5018dfbf09...

Powered by Google App Engine
This is Rietveld 408576698