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

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

Issue 2569963002: MemoryCoordinator checks if ServiceWorker exists on the suspending process (Closed)
Patch Set: Descriptive -> imperative Created 4 years 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
« no previous file with comments | « no previous file | content/browser/memory/memory_coordinator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_
6 #define CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ 6 #define CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_
7 7
8 #include "base/memory/memory_coordinator_client_registry.h" 8 #include "base/memory/memory_coordinator_client_registry.h"
9 #include "base/memory/memory_pressure_monitor.h" 9 #include "base/memory/memory_pressure_monitor.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // A map from process ID (RenderProcessHost::GetID()) to child process info. 98 // A map from process ID (RenderProcessHost::GetID()) to child process info.
99 using ChildInfoMap = std::map<int, ChildInfo>; 99 using ChildInfoMap = std::map<int, ChildInfo>;
100 100
101 ChildInfoMap& children() { return children_; } 101 ChildInfoMap& children() { return children_; }
102 102
103 private: 103 private:
104 #if !defined(OS_MACOSX) 104 #if !defined(OS_MACOSX)
105 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, HandleAdded); 105 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, HandleAdded);
106 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, CanSuspendRenderer); 106 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, CanSuspendRenderer);
107 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, CanThrottleRenderer); 107 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, CanThrottleRenderer);
108 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorWithServiceWorkerTest,
109 CannotSuspendRendererWithServiceWorker);
108 #endif 110 #endif
109 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, 111 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest,
110 ChildRemovedOnConnectionError); 112 ChildRemovedOnConnectionError);
111 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, SetChildMemoryState); 113 FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorTest, SetChildMemoryState);
112 114
113 // Called by SetChildMemoryState() to determine a child memory state based on 115 // Called by SetChildMemoryState() to determine a child memory state based on
114 // the current status of the child process. 116 // the current status of the child process.
115 mojom::MemoryState OverrideGlobalState(mojom::MemoryState memroy_state, 117 mojom::MemoryState OverrideGlobalState(mojom::MemoryState memroy_state,
116 const ChildInfo& child); 118 const ChildInfo& child);
117 119
(...skipping 11 matching lines...) Expand all
129 ChildInfoMap children_; 131 ChildInfoMap children_;
130 132
131 std::unique_ptr<MemoryCoordinatorDelegate> delegate_; 133 std::unique_ptr<MemoryCoordinatorDelegate> delegate_;
132 134
133 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator); 135 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator);
134 }; 136 };
135 137
136 } // namespace content 138 } // namespace content
137 139
138 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ 140 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/memory/memory_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698