OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/renderer_host/web_cache_manager.h" | 5 #include "chrome/browser/renderer_host/web_cache_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/prefs/pref_registry_simple.h" |
| 15 #include "base/prefs/pref_service.h" |
14 #include "base/sys_info.h" | 16 #include "base/sys_info.h" |
15 #include "base/time.h" | 17 #include "base/time.h" |
16 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/prefs/pref_registry_simple.h" | |
18 #include "chrome/browser/prefs/pref_service.h" | |
19 #include "chrome/common/chrome_constants.h" | 19 #include "chrome/common/chrome_constants.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/render_messages.h" | 22 #include "chrome/common/render_messages.h" |
23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
24 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" |
25 | 25 |
26 using base::Time; | 26 using base::Time; |
27 using base::TimeDelta; | 27 using base::TimeDelta; |
28 using WebKit::WebCache; | 28 using WebKit::WebCache; |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 if (idle >= TimeDelta::FromMinutes(kRendererInactiveThresholdMinutes)) { | 434 if (idle >= TimeDelta::FromMinutes(kRendererInactiveThresholdMinutes)) { |
435 // Moved to inactive status. This invalidates our iterator. | 435 // Moved to inactive status. This invalidates our iterator. |
436 inactive_renderers_.insert(*iter); | 436 inactive_renderers_.insert(*iter); |
437 active_renderers_.erase(*iter); | 437 active_renderers_.erase(*iter); |
438 iter = active_renderers_.begin(); | 438 iter = active_renderers_.begin(); |
439 continue; | 439 continue; |
440 } | 440 } |
441 ++iter; | 441 ++iter; |
442 } | 442 } |
443 } | 443 } |
OLD | NEW |