diff options
-rw-r--r-- | net/disk_cache/block_files.cc | 2 | ||||
-rw-r--r-- | net/disk_cache/rankings.cc | 2 | ||||
-rw-r--r-- | net/disk_cache/trace.cc | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/net/disk_cache/block_files.cc b/net/disk_cache/block_files.cc index a0fc6b6..2b849fc 100644 --- a/net/disk_cache/block_files.cc +++ b/net/disk_cache/block_files.cc @@ -122,6 +122,7 @@ void DeleteMapBlock(int index, int size, disk_cache::BlockFileHeader* header) { HISTOGRAM_TIMES("DiskCache.DeleteBlock", TimeTicks::Now() - start); } +#ifndef NDEBUG // Returns true if the specified block is used. Note that this is a simplified // version of DeleteMapBlock(). bool UsedMapBlock(int index, int size, disk_cache::BlockFileHeader* header) { @@ -140,6 +141,7 @@ bool UsedMapBlock(int index, int size, disk_cache::BlockFileHeader* header) { uint8 to_clear = ((1 << size) - 1) << (index % 8); return ((byte_map[byte_index] & to_clear) == to_clear); } +#endif // NDEBUG // Restores the "empty counters" and allocation hints. void FixAllocationCounters(disk_cache::BlockFileHeader* header) { diff --git a/net/disk_cache/rankings.cc b/net/disk_cache/rankings.cc index e7c6736..5c0313b 100644 --- a/net/disk_cache/rankings.cc +++ b/net/disk_cache/rankings.cc @@ -65,6 +65,7 @@ enum CrashLocation { ON_REMOVE_3, ON_REMOVE_4, ON_REMOVE_5, ON_REMOVE_6, ON_REMOVE_7, ON_REMOVE_8 }; +#ifndef NDEBUG void TerminateSelf() { #if defined(OS_WIN) // Windows does more work on _exit() than we would like, so we force exit. @@ -75,6 +76,7 @@ void TerminateSelf() { _exit(0); #endif } +#endif // NDEBUG // Generates a crash on debug builds, acording to the value of g_rankings_crash. // This used by crash_cache.exe to generate unit-test files. diff --git a/net/disk_cache/trace.cc b/net/disk_cache/trace.cc index 9578339..c16068a 100644 --- a/net/disk_cache/trace.cc +++ b/net/disk_cache/trace.cc @@ -31,6 +31,7 @@ struct TraceBuffer { char buffer[kNumberOfEntries][kEntrySize]; }; +#if ENABLE_TRACING void DebugOutput(const char* msg) { #if defined(OS_WIN) OutputDebugStringA(msg); @@ -38,6 +39,7 @@ void DebugOutput(const char* msg) { NOTIMPLEMENTED(); #endif } +#endif // ENABLE_TRACING } // namespace |