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

Issue 2261073002: Make HistoryBackend a client of memory coordinator (Closed)

Created:
4 years, 4 months ago by bashi
Modified:
4 years, 3 months ago
Reviewers:
haraken, chrisha, jam, sky
CC:
chromium-reviews, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, droger+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make HistoryBackend a client of memory coordinator When memory coordinator is enabled, HistoryBackend becomes a client of memory coordinator instead of installing MemoryPressureListener. Also MemoryCoordinator becomes a singleton so that any component can access MemoryCoordinator to listen to memory events. BUG=639700 Committed: https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6 Cr-Commit-Position: refs/heads/master@{#415141}

Patch Set 1 #

Patch Set 2 : singleton #

Total comments: 4

Patch Set 3 : comment #

Total comments: 4

Patch Set 4 : Unregister client & tweaks #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -31 lines) Patch
M components/history/core/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/history/core/browser/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/history/core/browser/history_backend.h View 4 chunks +9 lines, -1 line 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 5 chunks +26 lines, -6 lines 0 comments Download
M components/memory_coordinator/browser/memory_coordinator.h View 1 3 chunks +7 lines, -1 line 0 comments Download
M components/memory_coordinator/browser/memory_coordinator.cc View 1 2 chunks +10 lines, -0 lines 0 comments Download
M components/memory_coordinator/browser/memory_coordinator_unittest.cc View 1 2 chunks +9 lines, -4 lines 0 comments Download
M components/memory_coordinator/common/memory_coordinator_client.h View 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/browser_main_loop.h View 1 3 chunks +0 lines, -9 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 3 chunks +0 lines, -7 lines 0 comments Download
M content/browser/memory/memory_coordinator_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 52 (28 generated)
bashi
PTAL This CL depends on https://codereview.chromium.org/2265893002. If this looks good to you, I'll ask history ...
4 years, 4 months ago (2016-08-23 00:27:12 UTC) #8
haraken
non-owner LGTM
4 years, 4 months ago (2016-08-23 00:34:38 UTC) #9
bashi
sky@: could you review components/history ? jam@: could you review content/ ?
4 years, 4 months ago (2016-08-23 14:04:38 UTC) #13
sky
https://codereview.chromium.org/2261073002/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2261073002/diff/20001/components/history/core/browser/history_backend.cc#newcode259 components/history/core/browser/history_backend.cc:259: memory_pressure_listener_.reset(new base::MemoryPressureListener( How come you couldn't change MemoryPressureListener directly ...
4 years, 4 months ago (2016-08-23 17:20:08 UTC) #14
jam
https://codereview.chromium.org/2261073002/diff/20001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2261073002/diff/20001/content/browser/browser_main_loop.cc#newcode719 content/browser/browser_main_loop.cc:719: memory_coordinator::MemoryCoordinator::GetInstance(); why is this needed? the constructor of MC ...
4 years, 4 months ago (2016-08-23 17:37:16 UTC) #15
bashi
Thank you for review! https://codereview.chromium.org/2261073002/diff/20001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2261073002/diff/20001/components/history/core/browser/history_backend.cc#newcode259 components/history/core/browser/history_backend.cc:259: memory_pressure_listener_.reset(new base::MemoryPressureListener( On 2016/08/23 17:20:08, ...
4 years, 4 months ago (2016-08-24 23:33:28 UTC) #17
sky
https://codereview.chromium.org/2261073002/diff/40001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2261073002/diff/40001/components/history/core/browser/history_backend.cc#newcode257 components/history/core/browser/history_backend.cc:257: memory_coordinator::MemoryCoordinator::GetInstance()->RegisterClient(this); Shouldn't you unregister in the destructor? https://codereview.chromium.org/2261073002/diff/40001/components/history/core/browser/history_backend.cc#newcode760 components/history/core/browser/history_backend.cc:760: ...
4 years, 4 months ago (2016-08-24 23:48:21 UTC) #19
bashi
https://codereview.chromium.org/2261073002/diff/40001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/2261073002/diff/40001/components/history/core/browser/history_backend.cc#newcode257 components/history/core/browser/history_backend.cc:257: memory_coordinator::MemoryCoordinator::GetInstance()->RegisterClient(this); On 2016/08/24 23:48:21, sky wrote: > Shouldn't you ...
4 years, 4 months ago (2016-08-24 23:57:53 UTC) #22
sky
LGTM
4 years, 4 months ago (2016-08-25 00:02:03 UTC) #23
bashi
jam@: could you take another look?
4 years, 3 months ago (2016-08-25 23:06:07 UTC) #26
jam
lgtm
4 years, 3 months ago (2016-08-28 23:38:02 UTC) #27
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/2261073002/80001
4 years, 3 months ago (2016-08-28 23:40:26 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/131506)
4 years, 3 months ago (2016-08-29 00:47:28 UTC) #32
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/2261073002/80001
4 years, 3 months ago (2016-08-29 00:56:22 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/131527)
4 years, 3 months ago (2016-08-29 02:08:13 UTC) #36
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/2261073002/80001
4 years, 3 months ago (2016-08-29 04:49:40 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/131680)
4 years, 3 months ago (2016-08-29 06:21:54 UTC) #40
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/2261073002/80001
4 years, 3 months ago (2016-08-29 09:56:30 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/131875)
4 years, 3 months ago (2016-08-29 10:58:48 UTC) #44
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/2261073002/80001
4 years, 3 months ago (2016-08-29 23:17:21 UTC) #46
chrisha
+1 to the singleton pattern, I think this will make other cases like this much ...
4 years, 3 months ago (2016-08-30 02:40:12 UTC) #47
bashi
On 2016/08/30 02:40:12, chrisha (slow) wrote: > +1 to the singleton pattern, I think this ...
4 years, 3 months ago (2016-08-30 03:01:42 UTC) #48
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-08-30 05:13:57 UTC) #50
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 05:16:47 UTC) #52
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/953291ad42525b286dbf60be49cecd001c98b8e6
Cr-Commit-Position: refs/heads/master@{#415141}

Powered by Google App Engine
This is Rietveld 408576698