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

Side by Side Diff: chrome/browser/cache_manager_host.cc

Issue 4079: Porting refactoring changes:... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 2 months 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "chrome/browser/cache_manager_host.h" 7 #include "chrome/browser/cache_manager_host.h"
8 8
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/render_process_host.h" 12 #include "chrome/browser/render_process_host.h"
13 #include "chrome/common/chrome_constants.h" 13 #include "chrome/common/chrome_constants.h"
14 #include "chrome/common/env_util.h"
15 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
16 #include "chrome/common/pref_service.h" 15 #include "chrome/common/pref_service.h"
17 #include "chrome/common/notification_service.h" 16 #include "chrome/common/notification_service.h"
18 17
19 static const unsigned int kReviseAllocationDelayMS = 200 /* milliseconds */; 18 static const unsigned int kReviseAllocationDelayMS = 200 /* milliseconds */;
20 19
21 // The default size limit of the in-memory cache is 8 MB 20 // The default size limit of the in-memory cache is 8 MB
22 static const int kDefaultMemoryCacheSize = 8 * 1024 * 1024; 21 static const int kDefaultMemoryCacheSize = 8 * 1024 * 1024;
23 22
24 // The amount of idle time before we consider a tab to be "inactive" 23 // The amount of idle time before we consider a tab to be "inactive"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // Moved to inactive status. This invalidates our iterator. 368 // Moved to inactive status. This invalidates our iterator.
370 inactive_renderers_.insert(*iter); 369 inactive_renderers_.insert(*iter);
371 active_renderers_.erase(*iter); 370 active_renderers_.erase(*iter);
372 iter = active_renderers_.begin(); 371 iter = active_renderers_.begin();
373 continue; 372 continue;
374 } 373 }
375 ++iter; 374 ++iter;
376 } 375 }
377 } 376 }
378 377
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698