OLD | NEW |
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 COMPONENTS_WEB_CACHE_BROWSER_WEB_CACHE_MANAGER_H_ | 8 #ifndef COMPONENTS_WEB_CACHE_BROWSER_WEB_CACHE_MANAGER_H_ |
9 #define COMPONENTS_WEB_CACHE_BROWSER_WEB_CACHE_MANAGER_H_ | 9 #define COMPONENTS_WEB_CACHE_BROWSER_WEB_CACHE_MANAGER_H_ |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "components/web_cache/public/interfaces/web_cache.mojom.h" | 22 #include "components/web_cache/public/interfaces/web_cache.mojom.h" |
23 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
24 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 template<typename Type> | 27 template<typename Type> |
28 struct DefaultSingletonTraits; | 28 struct DefaultSingletonTraits; |
29 } // namespace base | 29 } // namespace base |
30 | 30 |
31 class PrefRegistrySimple; | |
32 | |
33 namespace web_cache { | 31 namespace web_cache { |
34 | 32 |
35 // Note: memory usage uses uint64_t because potentially the browser could be | 33 // Note: memory usage uses uint64_t because potentially the browser could be |
36 // 32 bit and the renderers 64 bits. | 34 // 32 bit and the renderers 64 bits. |
37 class WebCacheManager : public content::NotificationObserver { | 35 class WebCacheManager : public content::NotificationObserver { |
38 friend class WebCacheManagerTest; | 36 friend class WebCacheManagerTest; |
39 FRIEND_TEST_ALL_PREFIXES( | 37 FRIEND_TEST_ALL_PREFIXES( |
40 WebCacheManagerTest, | 38 WebCacheManagerTest, |
41 GatherStatsTest); | 39 GatherStatsTest); |
42 FRIEND_TEST_ALL_PREFIXES( | 40 FRIEND_TEST_ALL_PREFIXES( |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 WebCacheServicesMap web_cache_services_; | 264 WebCacheServicesMap web_cache_services_; |
267 | 265 |
268 base::WeakPtrFactory<WebCacheManager> weak_factory_; | 266 base::WeakPtrFactory<WebCacheManager> weak_factory_; |
269 | 267 |
270 DISALLOW_COPY_AND_ASSIGN(WebCacheManager); | 268 DISALLOW_COPY_AND_ASSIGN(WebCacheManager); |
271 }; | 269 }; |
272 | 270 |
273 } // namespace web_cache | 271 } // namespace web_cache |
274 | 272 |
275 #endif // COMPONENTS_WEB_CACHE_BROWSER_WEB_CACHE_MANAGER_H_ | 273 #endif // COMPONENTS_WEB_CACHE_BROWSER_WEB_CACHE_MANAGER_H_ |
OLD | NEW |