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

Side by Side Diff: chrome/browser/memory/oom_priority_manager.h

Issue 1188823002: [MemoryPressure] Move chrome/browser/chromeos/* to chrome/browser/memory/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky@ comments. Created 5 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_ 5 #ifndef CHROME_BROWSER_MEMORY_OOM_PRIORITY_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_ 6 #define CHROME_BROWSER_MEMORY_OOM_PRIORITY_MANAGER_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/memory_pressure_listener.h" 14 #include "base/memory/memory_pressure_listener.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/process/process.h" 16 #include "base/process/process.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "base/synchronization/lock.h" 18 #include "base/synchronization/lock.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "base/timer/timer.h" 20 #include "base/timer/timer.h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 23
24 class GURL; 24 class GURL;
25 25
26 namespace chromeos { 26 namespace memory {
27 27
28 class LowMemoryObserver; 28 class LowMemoryObserver;
29 29
30 // The OomPriorityManager periodically checks (see 30 // The OomPriorityManager periodically checks (see
31 // ADJUSTMENT_INTERVAL_SECONDS in the source) the status of renderers 31 // ADJUSTMENT_INTERVAL_SECONDS in the source) the status of renderers
32 // and adjusts the out of memory (OOM) adjustment value (in 32 // and adjusts the out of memory (OOM) adjustment value (in
33 // /proc/<pid>/oom_score_adj) of the renderers so that they match the 33 // /proc/<pid>/oom_score_adj) of the renderers so that they match the
34 // algorithm embedded here for priority in being killed upon OOM 34 // algorithm embedded here for priority in being killed upon OOM
35 // conditions. 35 // conditions.
36 // 36 //
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Number of times we have discarded a tab, for statistics. 185 // Number of times we have discarded a tab, for statistics.
186 int discard_count_; 186 int discard_count_;
187 187
188 // Whether a tab discard event has occurred during the last time interval, 188 // Whether a tab discard event has occurred during the last time interval,
189 // used for statistics normalized by usage. 189 // used for statistics normalized by usage.
190 bool recent_tab_discard_; 190 bool recent_tab_discard_;
191 191
192 DISALLOW_COPY_AND_ASSIGN(OomPriorityManager); 192 DISALLOW_COPY_AND_ASSIGN(OomPriorityManager);
193 }; 193 };
194 194
195 } // namespace chromeos 195 } // namespace memory
196 196
197 #endif // CHROME_BROWSER_CHROMEOS_MEMORY_OOM_PRIORITY_MANAGER_H_ 197 #endif // CHROME_BROWSER_MEMORY_OOM_PRIORITY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698