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

Side by Side Diff: content/browser/memory/memory_coordinator_impl.h

Issue 2741883004: Remove MemoryCoordinatorProxy::SetCurrentMemoryStateForTesting (Closed)
Patch Set: Created 3 years, 9 months 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 #ifndef CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_IMPL_H_ 5 #ifndef CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_IMPL_H_
6 #define CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_IMPL_H_ 6 #define CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_IMPL_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/memory_coordinator_client.h" 9 #include "base/memory/memory_coordinator_client.h"
10 #include "base/memory/memory_coordinator_proxy.h" 10 #include "base/memory/memory_coordinator_proxy.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // if the process is not tracked by this coordinator. 73 // if the process is not tracked by this coordinator.
74 MemoryState GetChildMemoryState(int render_process_id) const; 74 MemoryState GetChildMemoryState(int render_process_id) const;
75 75
76 // Records memory pressure notifications. Called by MemoryPressureMonitor. 76 // Records memory pressure notifications. Called by MemoryPressureMonitor.
77 // TODO(bashi): Remove this when MemoryPressureMonitor is retired. 77 // TODO(bashi): Remove this when MemoryPressureMonitor is retired.
78 void RecordMemoryPressure( 78 void RecordMemoryPressure(
79 base::MemoryPressureMonitor::MemoryPressureLevel level); 79 base::MemoryPressureMonitor::MemoryPressureLevel level);
80 80
81 // base::MemoryCoordinator implementations: 81 // base::MemoryCoordinator implementations:
82 MemoryState GetCurrentMemoryState() const override; 82 MemoryState GetCurrentMemoryState() const override;
83 // Temporarily sets memory state of the browser process for testing.
84 void SetCurrentMemoryStateForTesting(MemoryState memory_state) override;
85 83
86 // content::MemoryCoordinator implementation: 84 // content::MemoryCoordinator implementation:
87 MemoryState GetStateForProcess(base::ProcessHandle handle) override; 85 MemoryState GetStateForProcess(base::ProcessHandle handle) override;
88 86
89 // NotificationObserver implementation: 87 // NotificationObserver implementation:
90 void Observe(int type, 88 void Observe(int type,
91 const NotificationSource& source, 89 const NotificationSource& source,
92 const NotificationDetails& details) override; 90 const NotificationDetails& details) override;
93 91
94 // Returns the current memory condition. 92 // Returns the current memory condition.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // MemoryCoordinator and removed automatically when an underlying binding is 210 // MemoryCoordinator and removed automatically when an underlying binding is
213 // disconnected. 211 // disconnected.
214 ChildInfoMap children_; 212 ChildInfoMap children_;
215 213
216 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorImpl); 214 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorImpl);
217 }; 215 };
218 216
219 } // namespace content 217 } // namespace content
220 218
221 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_IMPL_H_ 219 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/tab_loader_unittest.cc ('k') | content/browser/memory/memory_coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698