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

Unified Diff: Source/core/fetch/MemoryCache.cpp

Issue 143003030: Removing using namespace std as per Blink coding guidelines (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/loader/CrossOriginPreflightResultCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/MemoryCache.cpp
diff --git a/Source/core/fetch/MemoryCache.cpp b/Source/core/fetch/MemoryCache.cpp
index 2176169c1a991ef96676a85896f598bab5d5f26b..516866a47c2ebd98840f091b2b0eb30112c3971a 100644
--- a/Source/core/fetch/MemoryCache.cpp
+++ b/Source/core/fetch/MemoryCache.cpp
@@ -41,8 +41,6 @@
#include "wtf/TemporaryChange.h"
#include "wtf/text/CString.h"
-using namespace std;
-
namespace WebCore {
static MemoryCache* gMemoryCache;
@@ -149,9 +147,9 @@ Resource* MemoryCache::resourceForURL(const KURL& resourceURL)
size_t MemoryCache::deadCapacity() const
{
// Dead resource capacity is whatever space is not occupied by live resources, bounded by an independent minimum and maximum.
- size_t capacity = m_capacity - min(m_liveSize, m_capacity); // Start with available capacity.
- capacity = max(capacity, m_minDeadCapacity); // Make sure it's above the minimum.
- capacity = min(capacity, m_maxDeadCapacity); // Make sure it's below the maximum.
+ size_t capacity = m_capacity - std::min(m_liveSize, m_capacity); // Start with available capacity.
+ capacity = std::max(capacity, m_minDeadCapacity); // Make sure it's above the minimum.
+ capacity = std::min(capacity, m_maxDeadCapacity); // Make sure it's below the maximum.
return capacity;
}
@@ -316,7 +314,7 @@ bool MemoryCache::evict(Resource* resource)
MemoryCache::LRUList* MemoryCache::lruListFor(Resource* resource)
{
- unsigned accessCount = max(resource->accessCount(), 1U);
+ unsigned accessCount = std::max(resource->accessCount(), 1U);
unsigned queueIndex = WTF::fastLog2(resource->size() / accessCount);
#ifndef NDEBUG
resource->m_lruIndex = queueIndex;
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/loader/CrossOriginPreflightResultCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698