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

Side by Side Diff: chrome/browser/memory_purger.h

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/memory_purger.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // MemoryPurger provides static APIs to purge as much memory as possible from 5 // MemoryPurger provides static APIs to purge as much memory as possible from
6 // all processes. These can be hooked to various signals to try and balance 6 // all processes. These can be hooked to various signals to try and balance
7 // memory consumption, speed, page swapping, etc. 7 // memory consumption, speed, page swapping, etc.
8 // 8 //
9 // This was implemented in an attempt to speed up suspend-to-disk by throwing 9 // This was implemented in an attempt to speed up suspend-to-disk by throwing
10 // away any cached data that can be recomputed. Memory use will rapidly 10 // away any cached data that can be recomputed. Memory use will rapidly
11 // re-expand after this purge is run. 11 // re-expand after this purge is run.
12 12
13 #ifndef CHROME_BROWSER_MEMORY_PURGER_H_ 13 #ifndef CHROME_BROWSER_MEMORY_PURGER_H_
14 #define CHROME_BROWSER_MEMORY_PURGER_H_ 14 #define CHROME_BROWSER_MEMORY_PURGER_H_
15 #pragma once 15 #pragma once
16 16
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 18
19 namespace content {
19 class RenderProcessHost; 20 class RenderProcessHost;
21 }
20 22
21 class MemoryPurger { 23 class MemoryPurger {
22 public: 24 public:
23 // Call any of these on the UI thread to purge memory from the named places. 25 // Call any of these on the UI thread to purge memory from the named places.
24 static void PurgeAll(); 26 static void PurgeAll();
25 static void PurgeBrowser(); 27 static void PurgeBrowser();
26 static void PurgeRenderers(); 28 static void PurgeRenderers();
27 static void PurgeRendererForHost(RenderProcessHost* host); 29 static void PurgeRendererForHost(content::RenderProcessHost* host);
28 30
29 private: 31 private:
30 DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryPurger); 32 DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryPurger);
31 }; 33 };
32 34
33 #endif // CHROME_BROWSER_MEMORY_PURGER_H_ 35 #endif // CHROME_BROWSER_MEMORY_PURGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/memory_purger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698