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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 10
11 #include <list>
11 #include <map> 12 #include <map>
12 #include <list>
13 #include <set> 13 #include <set>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/time.h" 19 #include "base/time.h"
20 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
23 23
24 template<typename Type> 24 template<typename Type>
25 struct DefaultSingletonTraits; 25 struct DefaultSingletonTraits;
26 class PrefServiceSimple; 26 class PrefRegistrySimple;
27 27
28 class WebCacheManager : public content::NotificationObserver { 28 class WebCacheManager : public content::NotificationObserver {
29 friend class WebCacheManagerTest; 29 friend class WebCacheManagerTest;
30 FRIEND_TEST_ALL_PREFIXES(WebCacheManagerBrowserTest, CrashOnceOnly); 30 FRIEND_TEST_ALL_PREFIXES(WebCacheManagerBrowserTest, CrashOnceOnly);
31 31
32 public: 32 public:
33 static void RegisterPrefs(PrefServiceSimple* prefs); 33 static void RegisterPrefs(PrefRegistrySimple* registry);
34 34
35 // Gets the singleton WebCacheManager object. The first time this method 35 // Gets the singleton WebCacheManager object. The first time this method
36 // is called, a WebCacheManager object is constructed and returned. 36 // is called, a WebCacheManager object is constructed and returned.
37 // Subsequent calls will return the same object. 37 // Subsequent calls will return the same object.
38 static WebCacheManager* GetInstance(); 38 static WebCacheManager* GetInstance();
39 39
40 // When a render process is created, it registers itself with the cache 40 // When a render process is created, it registers itself with the cache
41 // manager host, causing the renderer to be allocated cache resources. 41 // manager host, causing the renderer to be allocated cache resources.
42 void Add(int renderer_id); 42 void Add(int renderer_id);
43 43
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 std::set<int> inactive_renderers_; 213 std::set<int> inactive_renderers_;
214 214
215 base::WeakPtrFactory<WebCacheManager> weak_factory_; 215 base::WeakPtrFactory<WebCacheManager> weak_factory_;
216 216
217 content::NotificationRegistrar registrar_; 217 content::NotificationRegistrar registrar_;
218 218
219 DISALLOW_COPY_AND_ASSIGN(WebCacheManager); 219 DISALLOW_COPY_AND_ASSIGN(WebCacheManager);
220 }; 220 };
221 221
222 #endif // CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_ 222 #endif // CHROME_BROWSER_RENDERER_HOST_WEB_CACHE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.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