1 // Copyright 2011 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_DISK_CACHE_BLOCKFILE_STRESS_SUPPORT_H_ 6 #define NET_DISK_CACHE_BLOCKFILE_STRESS_SUPPORT_H_ 7 8 #include "base/check.h" 9 #include "base/notreached.h" 10 11 namespace disk_cache { 12 13 // Uncomment this line to generate a debug build of stress_cache with checks 14 // to ensure that we are not producing corrupt entries. 15 // #define NET_BUILD_STRESS_CACHE 1 16 17 // Uncomment this line to perform extended integrity checks during init. It is 18 // not recommended to enable this option unless some corruption is being tracked 19 // down. 20 // #define STRESS_CACHE_EXTENDED_VALIDATION 1 21 22 #if defined(NET_BUILD_STRESS_CACHE) 23 #define STRESS_NOTREACHED() NOTREACHED() 24 #define STRESS_DCHECK(a) DCHECK(a) 25 #else 26 // We don't support streams with these macros, but that's a small price to pay 27 // to have a straightforward logic here. Please don't add something like 28 // LogMessageVoidify. 29 #define STRESS_NOTREACHED() {} 30 #define STRESS_DCHECK(a) {} 31 #endif 32 33 } // namespace disk_cache 34 35 #endif // NET_DISK_CACHE_BLOCKFILE_STRESS_SUPPORT_H_ 36