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

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

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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) 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"
(...skipping 11 matching lines...) Expand all
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 #if defined(OS_ANDROID) 26 #if defined(OS_ANDROID)
27 #include "base/android/sys_utils.h" 27 #include "base/android/sys_utils.h"
28 #endif 28 #endif
29 29
30 using base::Time; 30 using base::Time;
31 using base::TimeDelta; 31 using base::TimeDelta;
32 using WebKit::WebCache; 32 using blink::WebCache;
33 33
34 static const int kReviseAllocationDelayMS = 200; 34 static const int kReviseAllocationDelayMS = 200;
35 35
36 // The default size limit of the in-memory cache is 8 MB 36 // The default size limit of the in-memory cache is 8 MB
37 static const int kDefaultMemoryCacheSize = 8 * 1024 * 1024; 37 static const int kDefaultMemoryCacheSize = 8 * 1024 * 1024;
38 38
39 namespace { 39 namespace {
40 40
41 int GetDefaultCacheSize() { 41 int GetDefaultCacheSize() {
42 // Start off with a modest default 42 // Start off with a modest default
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (idle >= TimeDelta::FromMinutes(kRendererInactiveThresholdMinutes)) { 440 if (idle >= TimeDelta::FromMinutes(kRendererInactiveThresholdMinutes)) {
441 // Moved to inactive status. This invalidates our iterator. 441 // Moved to inactive status. This invalidates our iterator.
442 inactive_renderers_.insert(*iter); 442 inactive_renderers_.insert(*iter);
443 active_renderers_.erase(*iter); 443 active_renderers_.erase(*iter);
444 iter = active_renderers_.begin(); 444 iter = active_renderers_.begin();
445 continue; 445 continue;
446 } 446 }
447 ++iter; 447 ++iter;
448 } 448 }
449 } 449 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/web_cache_manager.h ('k') | chrome/browser/renderer_host/web_cache_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698