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

Side by Side Diff: chrome/browser/renderer_host/web_cache_manager.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This is the browser side of the cache manager, it tracks the activity of the 5 // This is the browser side of the cache manager, it tracks the activity of the
6 // render processes and allocates available memory cache resources. 6 // render processes and allocates available memory cache resources.
7 7
8 #ifndef CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_ 8 #ifndef CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_
9 #define CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_ 9 #define CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_
10 #pragma once 10 #pragma once
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // The global limit on the number of bytes in all the in-memory caches. 64 // The global limit on the number of bytes in all the in-memory caches.
65 size_t global_size_limit() const { return global_size_limit_; } 65 size_t global_size_limit() const { return global_size_limit_; }
66 66
67 // Sets the global size limit, forcing a recalculation of cache allocations. 67 // Sets the global size limit, forcing a recalculation of cache allocations.
68 void SetGlobalSizeLimit(size_t bytes); 68 void SetGlobalSizeLimit(size_t bytes);
69 69
70 // Clears all in-memory caches. 70 // Clears all in-memory caches.
71 void ClearCache(); 71 void ClearCache();
72 72
73 // NotificationObserver implementation: 73 // NotificationObserver implementation:
74 virtual void Observe(NotificationType type, 74 virtual void Observe(int type,
75 const NotificationSource& source, 75 const NotificationSource& source,
76 const NotificationDetails& details) OVERRIDE; 76 const NotificationDetails& details) OVERRIDE;
77 77
78 // Gets the default global size limit. This interrogates system metrics to 78 // Gets the default global size limit. This interrogates system metrics to
79 // tune the default size to the current system. 79 // tune the default size to the current system.
80 static size_t GetDefaultGlobalSizeLimit(); 80 static size_t GetDefaultGlobalSizeLimit();
81 81
82 protected: 82 protected:
83 // The amount of idle time before we consider a tab to be "inactive" 83 // The amount of idle time before we consider a tab to be "inactive"
84 static const int kRendererInactiveThresholdMinutes = 5; 84 static const int kRendererInactiveThresholdMinutes = 5;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 std::set<int> inactive_renderers_; 201 std::set<int> inactive_renderers_;
202 202
203 ScopedRunnableMethodFactory<WebCacheManager> revise_allocation_factory_; 203 ScopedRunnableMethodFactory<WebCacheManager> revise_allocation_factory_;
204 204
205 NotificationRegistrar registrar_; 205 NotificationRegistrar registrar_;
206 206
207 DISALLOW_COPY_AND_ASSIGN(WebCacheManager); 207 DISALLOW_COPY_AND_ASSIGN(WebCacheManager);
208 }; 208 };
209 209
210 #endif // CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_ 210 #endif // CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | chrome/browser/renderer_host/web_cache_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698