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

Side by Side Diff: content/browser/renderer_host/backing_store_manager.cc

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/backing_store_manager.h" 5 #include "content/browser/renderer_host/backing_store_manager.h"
6 6
7 #include "base/sys_info.h" 7 #include "base/sys_info.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/browser/renderer_host/backing_store.h" 10 #include "content/browser/renderer_host/backing_store.h"
11 #include "chrome/browser/renderer_host/render_widget_host.h" 11 #include "content/browser/renderer_host/render_widget_host.h"
12 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
13 #include "chrome/common/mru_cache.h" 13 #include "chrome/common/mru_cache.h"
14 #include "chrome/common/notification_service.h" 14 #include "chrome/common/notification_service.h"
15 15
16 namespace { 16 namespace {
17 17
18 // There are two separate caches, |large_cache| and |small_cache|. large_cache 18 // There are two separate caches, |large_cache| and |small_cache|. large_cache
19 // is meant for large items (tabs, popup windows), while small_cache is meant 19 // is meant for large items (tabs, popup windows), while small_cache is meant
20 // for small items (extension toolstrips and buttons, etc.). The idea is that 20 // for small items (extension toolstrips and buttons, etc.). The idea is that
21 // we'll almost always try to evict from large_cache first since small_cache 21 // we'll almost always try to evict from large_cache first since small_cache
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 size_t mem = 0; 278 size_t mem = 0;
279 BackingStoreCache::iterator it; 279 BackingStoreCache::iterator it;
280 for (it = large_cache->begin(); it != large_cache->end(); ++it) 280 for (it = large_cache->begin(); it != large_cache->end(); ++it)
281 mem += it->second->MemorySize(); 281 mem += it->second->MemorySize();
282 282
283 for (it = small_cache->begin(); it != small_cache->end(); ++it) 283 for (it = small_cache->begin(); it != small_cache->end(); ++it)
284 mem += it->second->MemorySize(); 284 mem += it->second->MemorySize();
285 285
286 return mem; 286 return mem;
287 } 287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698