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

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

Issue 2360433002: Memory-monitor for Mac. (Closed)
Patch Set: calculate adjustment based on poll interval; limit calculations to avoid overflow 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 "content/public/browser/content_browser_client.h" 8 #include "content/public/browser/content_browser_client.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void MemoryCoordinator::EnableFeaturesForTesting() { 123 void MemoryCoordinator::EnableFeaturesForTesting() {
124 base::FeatureList::ClearInstanceForTesting(); 124 base::FeatureList::ClearInstanceForTesting();
125 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); 125 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
126 feature_list->InitializeFromCommandLine(features::kMemoryCoordinator.name, 126 feature_list->InitializeFromCommandLine(features::kMemoryCoordinator.name,
127 ""); 127 "");
128 base::FeatureList::SetInstance(std::move(feature_list)); 128 base::FeatureList::SetInstance(std::move(feature_list));
129 } 129 }
130 130
131 base::TimeDelta MemoryCoordinator::GetMonitoringInterval() const {
132 return base::TimeDelta::FromSeconds(0);
133 }
134
131 base::MemoryState MemoryCoordinator::GetCurrentMemoryState() const { 135 base::MemoryState MemoryCoordinator::GetCurrentMemoryState() const {
132 return base::MemoryState::UNKNOWN; 136 return base::MemoryState::UNKNOWN;
133 } 137 }
134 138
135 void MemoryCoordinator::SetCurrentMemoryStateForTesting( 139 void MemoryCoordinator::SetCurrentMemoryStateForTesting(
136 base::MemoryState memory_state) { 140 base::MemoryState memory_state) {
137 } 141 }
138 142
139 void MemoryCoordinator::AddChildForTesting( 143 void MemoryCoordinator::AddChildForTesting(
140 int dummy_render_process_id, mojom::ChildMemoryCoordinatorPtr child) { 144 int dummy_render_process_id, mojom::ChildMemoryCoordinatorPtr child) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 188
185 MemoryCoordinator::ChildInfo::ChildInfo() {} 189 MemoryCoordinator::ChildInfo::ChildInfo() {}
186 190
187 MemoryCoordinator::ChildInfo::ChildInfo(const ChildInfo& rhs) { 191 MemoryCoordinator::ChildInfo::ChildInfo(const ChildInfo& rhs) {
188 // This is a nop, but exists for compatibility with STL containers. 192 // This is a nop, but exists for compatibility with STL containers.
189 } 193 }
190 194
191 MemoryCoordinator::ChildInfo::~ChildInfo() {} 195 MemoryCoordinator::ChildInfo::~ChildInfo() {}
192 196
193 } // namespace content 197 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698