| OLD | NEW |
| 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_WEB_CACHE_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_WEB_CACHE_MANAGER_H_ |
| 9 #define CHROME_BROWSER_WEB_CACHE_MANAGER_H_ | 9 #define CHROME_BROWSER_WEB_CACHE_MANAGER_H_ |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <list> | 12 #include <list> |
| 13 #include <set> | 13 #include <set> |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "base/task.h" | 17 #include "base/task.h" |
| 18 #include "base/time.h" | 18 #include "base/time.h" |
| 19 #include "testing/gtest/include/gtest/gtest_prod.h" | 19 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 20 #include "webkit/api/public/WebCache.h" | 20 #include "third_party/WebKit/WebKit/chromium/public/WebCache.h" |
| 21 | 21 |
| 22 template<typename Type> | 22 template<typename Type> |
| 23 struct DefaultSingletonTraits; | 23 struct DefaultSingletonTraits; |
| 24 class PrefService; | 24 class PrefService; |
| 25 | 25 |
| 26 class WebCacheManager { | 26 class WebCacheManager { |
| 27 // Unit tests are our friends. | 27 // Unit tests are our friends. |
| 28 friend class WebCacheManagerTest; | 28 friend class WebCacheManagerTest; |
| 29 FRIEND_TEST(WebCacheManagerBrowserTest, DISABLED_CrashOnceOnly); | 29 FRIEND_TEST(WebCacheManagerBrowserTest, DISABLED_CrashOnceOnly); |
| 30 | 30 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // Inactive renderers are those renderers that have been inactive more | 186 // Inactive renderers are those renderers that have been inactive more |
| 187 // recently than they have been active. | 187 // recently than they have been active. |
| 188 std::set<int> inactive_renderers_; | 188 std::set<int> inactive_renderers_; |
| 189 | 189 |
| 190 ScopedRunnableMethodFactory<WebCacheManager> revise_allocation_factory_; | 190 ScopedRunnableMethodFactory<WebCacheManager> revise_allocation_factory_; |
| 191 | 191 |
| 192 DISALLOW_COPY_AND_ASSIGN(WebCacheManager); | 192 DISALLOW_COPY_AND_ASSIGN(WebCacheManager); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 #endif // CHROME_BROWSER_WEB_CACHE_MANAGER_H_ | 195 #endif // CHROME_BROWSER_WEB_CACHE_MANAGER_H_ |
| OLD | NEW |