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

Side by Side Diff: content/browser/memory/memory_coordinator.cc

Issue 2360433002: Memory-monitor for Mac. (Closed)
Patch Set: rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/memory/memory_coordinator.h" 5 #include "content/browser/memory/memory_coordinator.h"
6 6
7 #include "base/memory/memory_coordinator_client_registry.h" 7 #include "base/memory/memory_coordinator_client_registry.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "content/public/browser/content_browser_client.h" 9 #include "content/public/browser/content_browser_client.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL: 132 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
133 UMA_HISTOGRAM_ENUMERATION( 133 UMA_HISTOGRAM_ENUMERATION(
134 "Memory.Coordinator.StateOnCriticalNotificationReceived", 134 "Memory.Coordinator.StateOnCriticalNotificationReceived",
135 state, base::kMemoryStateMax); 135 state, base::kMemoryStateMax);
136 break; 136 break;
137 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE: 137 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
138 NOTREACHED(); 138 NOTREACHED();
139 } 139 }
140 } 140 }
141 141
142 base::TimeDelta MemoryCoordinator::GetMonitoringInterval() const {
143 return base::TimeDelta::FromSeconds(0);
144 }
145
142 base::MemoryState MemoryCoordinator::GetCurrentMemoryState() const { 146 base::MemoryState MemoryCoordinator::GetCurrentMemoryState() const {
143 return base::MemoryState::UNKNOWN; 147 return base::MemoryState::UNKNOWN;
144 } 148 }
145 149
146 void MemoryCoordinator::SetCurrentMemoryStateForTesting( 150 void MemoryCoordinator::SetCurrentMemoryStateForTesting(
147 base::MemoryState memory_state) { 151 base::MemoryState memory_state) {
148 } 152 }
149 153
150 void MemoryCoordinator::AddChildForTesting( 154 void MemoryCoordinator::AddChildForTesting(
151 int dummy_render_process_id, mojom::ChildMemoryCoordinatorPtr child) { 155 int dummy_render_process_id, mojom::ChildMemoryCoordinatorPtr child) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 199
196 MemoryCoordinator::ChildInfo::ChildInfo() {} 200 MemoryCoordinator::ChildInfo::ChildInfo() {}
197 201
198 MemoryCoordinator::ChildInfo::ChildInfo(const ChildInfo& rhs) { 202 MemoryCoordinator::ChildInfo::ChildInfo(const ChildInfo& rhs) {
199 // This is a nop, but exists for compatibility with STL containers. 203 // This is a nop, but exists for compatibility with STL containers.
200 } 204 }
201 205
202 MemoryCoordinator::ChildInfo::~ChildInfo() {} 206 MemoryCoordinator::ChildInfo::~ChildInfo() {}
203 207
204 } // namespace content 208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/memory/memory_coordinator.h ('k') | content/browser/memory/memory_coordinator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698