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

Side by Side Diff: Source/web/WebCache.cpp

Issue 207783002: Omit "int" when using "unsigned" modifier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/platform/text/UnicodeRange.cpp ('k') | Source/web/WebInputEventFactoryGtk.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 to.size = static_cast<size_t>(from.size); 46 to.size = static_cast<size_t>(from.size);
47 to.liveSize = static_cast<size_t>(from.liveSize); 47 to.liveSize = static_cast<size_t>(from.liveSize);
48 to.decodedSize = static_cast<size_t>(from.decodedSize); 48 to.decodedSize = static_cast<size_t>(from.decodedSize);
49 } 49 }
50 50
51 void WebCache::setCapacities( 51 void WebCache::setCapacities(
52 size_t minDeadCapacity, size_t maxDeadCapacity, size_t capacity) 52 size_t minDeadCapacity, size_t maxDeadCapacity, size_t capacity)
53 { 53 {
54 MemoryCache* cache = WebCore::memoryCache(); 54 MemoryCache* cache = WebCore::memoryCache();
55 if (cache) 55 if (cache)
56 cache->setCapacities(static_cast<unsigned int>(minDeadCapacity), 56 cache->setCapacities(static_cast<unsigned>(minDeadCapacity), static_cast <unsigned>(maxDeadCapacity), static_cast<unsigned>(capacity));
57 static_cast<unsigned int>(maxDeadCapacity),
58 static_cast<unsigned int>(capacity));
59 } 57 }
60 58
61 void WebCache::clear() 59 void WebCache::clear()
62 { 60 {
63 MemoryCache* cache = WebCore::memoryCache(); 61 MemoryCache* cache = WebCore::memoryCache();
64 if (cache) 62 if (cache)
65 cache->evictResources(); 63 cache->evictResources();
66 } 64 }
67 65
68 void WebCache::getUsageStats(UsageStats* result) 66 void WebCache::getUsageStats(UsageStats* result)
(...skipping 19 matching lines...) Expand all
88 ToResourceTypeStat(stats.images, result->images); 86 ToResourceTypeStat(stats.images, result->images);
89 ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets); 87 ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets);
90 ToResourceTypeStat(stats.scripts, result->scripts); 88 ToResourceTypeStat(stats.scripts, result->scripts);
91 ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets); 89 ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets);
92 ToResourceTypeStat(stats.fonts, result->fonts); 90 ToResourceTypeStat(stats.fonts, result->fonts);
93 } else 91 } else
94 memset(result, 0, sizeof(WebCache::ResourceTypeStats)); 92 memset(result, 0, sizeof(WebCache::ResourceTypeStats));
95 } 93 }
96 94
97 } // namespace blink 95 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/text/UnicodeRange.cpp ('k') | Source/web/WebInputEventFactoryGtk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698