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

Unified Diff: content/browser/memory/memory_coordinator_impl.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
« no previous file with comments | « content/browser/memory/memory_coordinator.cc ('k') | content/browser/memory/memory_coordinator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_coordinator_impl.cc
diff --git a/content/browser/memory/memory_coordinator_impl.cc b/content/browser/memory/memory_coordinator_impl.cc
index 776ce283100a477c4979ead20a61df487522134a..df4e005e6d7c27f5854deef3e4e8c327d9cb50b7 100644
--- a/content/browser/memory/memory_coordinator_impl.cc
+++ b/content/browser/memory/memory_coordinator_impl.cc
@@ -108,7 +108,7 @@ void MemoryCoordinatorImpl::Start() {
void MemoryCoordinatorImpl::OnChildAdded(int render_process_id) {
// Populate the global state as an initial state of a newly created process.
- SetMemoryState(render_process_id, ToMojomMemoryState(current_state_));
+ SetChildMemoryState(render_process_id, ToMojomMemoryState(current_state_));
}
base::MemoryState MemoryCoordinatorImpl::GetCurrentMemoryState() const {
@@ -147,7 +147,7 @@ void MemoryCoordinatorImpl::Observe(int type,
// We don't throttle/suspend a visible renderer for now.
auto new_state = is_visible ? mojom::MemoryState::NORMAL
: ToMojomMemoryState(current_state_);
- SetMemoryState(iter->first, new_state);
+ SetChildMemoryState(iter->first, new_state);
}
base::MemoryState MemoryCoordinatorImpl::CalculateNextState() {
@@ -216,10 +216,10 @@ void MemoryCoordinatorImpl::NotifyStateToClients() {
void MemoryCoordinatorImpl::NotifyStateToChildren() {
auto mojo_state = ToMojomMemoryState(current_state_);
- // It's OK to call SetMemoryState() unconditionally because it checks whether
- // this state transition is valid.
+ // It's OK to call SetChildMemoryState() unconditionally because it checks
+ // whether this state transition is valid.
for (auto& iter : children())
- SetMemoryState(iter.first, mojo_state);
+ SetChildMemoryState(iter.first, mojo_state);
}
void MemoryCoordinatorImpl::ScheduleUpdateState(base::TimeDelta delta) {
« no previous file with comments | « content/browser/memory/memory_coordinator.cc ('k') | content/browser/memory/memory_coordinator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698