Index: webrtc/base/diskcache.cc |
diff --git a/webrtc/base/diskcache.cc b/webrtc/base/diskcache.cc |
index 207a1afa1bf73d0dfc875ae25dd324e88172d01e..20b8bf68cc14a30d5aec374c5e17a7ac6c21d6aa 100644 |
--- a/webrtc/base/diskcache.cc |
+++ b/webrtc/base/diskcache.cc |
@@ -66,7 +66,7 @@ DiskCache::DiskCache() : max_cache_(0), total_size_(0), total_accessors_(0) { |
} |
DiskCache::~DiskCache() { |
- ASSERT(0 == total_accessors_); |
+ RTC_DCHECK(0 == total_accessors_); |
} |
bool DiskCache::Initialize(const std::string& folder, size_t size) { |
@@ -75,7 +75,7 @@ bool DiskCache::Initialize(const std::string& folder, size_t size) { |
folder_ = folder; |
max_cache_ = size; |
- ASSERT(0 == total_size_); |
+ RTC_DCHECK(0 == total_size_); |
if (!InitializeEntries()) |
return false; |
@@ -121,7 +121,7 @@ StreamInterface* DiskCache::WriteResource(const std::string& id, size_t index) { |
size_t previous_size = 0; |
std::string filename(IdToFilename(id, index)); |
FileStream::GetSize(filename, &previous_size); |
- ASSERT(previous_size <= entry->size); |
+ RTC_DCHECK(previous_size <= entry->size); |
if (previous_size > entry->size) { |
previous_size = entry->size; |
} |
@@ -221,7 +221,7 @@ bool DiskCache::CheckLimit() { |
for (EntryMap::iterator it = map_.begin(); it != map_.end(); ++it) { |
cache_size += it->second.size; |
} |
- ASSERT(cache_size == total_size_); |
+ RTC_DCHECK(cache_size == total_size_); |
#endif |
// TODO: Replace this with a non-brain-dead algorithm for clearing out the |
@@ -259,7 +259,7 @@ std::string DiskCache::IdToFilename(const std::string& id, size_t index) const { |
char* buffer = new char[buffer_size]; |
encode(buffer, buffer_size, id.data(), id.length(), |
unsafe_filename_characters(), '%'); |
- // TODO: ASSERT(strlen(buffer) < FileSystem::MaxBasenameLength()); |
+ // TODO(nisse): RTC_DCHECK(strlen(buffer) < FileSystem::MaxBasenameLength()); |
#else // !TRANSPARENT_CACHE_NAMES |
// We might want to just use a hash of the filename at some point, both for |
// obfuscation, and to avoid both filename length and escaping issues. |