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

Side by Side Diff: chrome/browser/sessions/tab_loader.h

Issue 1749073002: Do V8 GC ASAP if system memory is pressured (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_SESSIONS_TAB_LOADER_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_H_ 6 #define CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 CurrentMemoryPressureLevel(); 108 CurrentMemoryPressureLevel();
109 109
110 // React to memory pressure by stopping to load any more tabs. 110 // React to memory pressure by stopping to load any more tabs.
111 void OnMemoryPressure( 111 void OnMemoryPressure(
112 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); 112 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
113 113
114 scoped_ptr<TabLoaderDelegate> delegate_; 114 scoped_ptr<TabLoaderDelegate> delegate_;
115 115
116 // Listens for system under memory pressure notifications and stops loading 116 // Listens for system under memory pressure notifications and stops loading
117 // of tabs when we start running out of memory. 117 // of tabs when we start running out of memory.
118 base::MemoryPressureListener memory_pressure_listener_; 118 base::MemoryPressureListener* memory_pressure_listener_;
119 119
120 content::NotificationRegistrar registrar_; 120 content::NotificationRegistrar registrar_;
121 121
122 // The delay timer multiplier. See class description for details. 122 // The delay timer multiplier. See class description for details.
123 size_t force_load_delay_multiplier_; 123 size_t force_load_delay_multiplier_;
124 124
125 // True if the tab loading is enabled. 125 // True if the tab loading is enabled.
126 bool loading_enabled_; 126 bool loading_enabled_;
127 127
128 // The set of tabs we've initiated loading on. This does NOT include the 128 // The set of tabs we've initiated loading on. This does NOT include the
(...skipping 16 matching lines...) Expand all
145 // explicitly referenced so that it can be notified of deferred tab loads due 145 // explicitly referenced so that it can be notified of deferred tab loads due
146 // to memory pressure. 146 // to memory pressure.
147 scoped_refptr<SessionRestoreStatsCollector> stats_collector_; 147 scoped_refptr<SessionRestoreStatsCollector> stats_collector_;
148 148
149 static TabLoader* shared_tab_loader_; 149 static TabLoader* shared_tab_loader_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(TabLoader); 151 DISALLOW_COPY_AND_ASSIGN(TabLoader);
152 }; 152 };
153 153
154 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_H_ 154 #endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698