Chromium Code Reviews

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

Issue 2448953002: Add MemoryCoordinatorProxy::SetCurrentMemoryStateForTesting (Closed)
Patch Set: Add tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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 647c00f1aaef7ca6d4bec3f1af00406254f42654..7d841b351a5bf873c09ea16686536ae7159b5b10 100644
--- a/content/browser/memory/memory_coordinator_impl.cc
+++ b/content/browser/memory/memory_coordinator_impl.cc
@@ -114,6 +114,11 @@ base::MemoryState MemoryCoordinatorImpl::GetCurrentMemoryState() const {
return current_state_;
}
+void MemoryCoordinatorImpl::SetCurrentMemoryStateForTesting(
+ base::MemoryState memory_state) {
+ current_state_ = memory_state;
bashi 2016/10/25 23:29:02 Don't we have to trigger OnMemoryStateChange() for
hajimehoshi 2016/10/26 07:12:44 Done.
+}
+
void MemoryCoordinatorImpl::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
« no previous file with comments | « content/browser/memory/memory_coordinator_impl.h ('k') | content/browser/memory/memory_coordinator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine