| 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 #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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| 11 #include "base/singleton.h" | 11 #include "base/singleton.h" |
| 12 #include "base/sys_info.h" | 12 #include "base/sys_info.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
| 16 #include "chrome/browser/renderer_host/render_process_host.h" | 16 #include "chrome/browser/renderer_host/render_process_host.h" |
| 17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
| 20 #include "chrome/common/render_messages.h" | 20 #include "chrome/common/render_messages.h" |
| 21 | 21 |
| 22 using base::Time; | 22 using base::Time; |
| 23 using base::TimeDelta; | 23 using base::TimeDelta; |
| 24 using WebKit::WebCache; | 24 using WebKit::WebCache; |
| 25 | 25 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 if (idle >= TimeDelta::FromMinutes(kRendererInactiveThresholdMinutes)) { | 386 if (idle >= TimeDelta::FromMinutes(kRendererInactiveThresholdMinutes)) { |
| 387 // Moved to inactive status. This invalidates our iterator. | 387 // Moved to inactive status. This invalidates our iterator. |
| 388 inactive_renderers_.insert(*iter); | 388 inactive_renderers_.insert(*iter); |
| 389 active_renderers_.erase(*iter); | 389 active_renderers_.erase(*iter); |
| 390 iter = active_renderers_.begin(); | 390 iter = active_renderers_.begin(); |
| 391 continue; | 391 continue; |
| 392 } | 392 } |
| 393 ++iter; | 393 ++iter; |
| 394 } | 394 } |
| 395 } | 395 } |
| OLD | NEW |