Pass CreateDirectory errors up to IndexedDB.
[chromium-blink-merge.git] / net / disk_cache / stress_support.h
blob48d7b5b7df248ca43461df95542ea0fac5c3bbed
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_DISK_CACHE_STRESS_SUPPORT_H_
6 #define NET_DISK_CACHE_STRESS_SUPPORT_H_
8 #include "base/logging.h"
10 namespace disk_cache {
12 // Uncomment this line to generate a debug build of stress_cache with checks
13 // to ensure that we are not producing corrupt entries.
14 // #define NET_BUILD_STRESS_CACHE 1
16 // Uncomment this line to direct the in-memory disk cache tracing to the base
17 // logging system. On Windows this option will enable ETW (Event Tracing for
18 // Windows) so logs across multiple runs can be collected.
19 // #define DISK_CACHE_TRACE_TO_LOG 1
21 // Uncomment this line to perform extended integrity checks during init. It is
22 // not recommended to enable this option unless some corruption is being tracked
23 // down.
24 // #define STRESS_CACHE_EXTENDED_VALIDATION 1
26 #if defined(NET_BUILD_STRESS_CACHE)
27 #define STRESS_NOTREACHED() NOTREACHED()
28 #define STRESS_DCHECK(a) DCHECK(a)
29 #else
30 // We don't support streams with these macros, but that's a small price to pay
31 // to have a straightforward logic here. Please don't add something like
32 // LogMessageVoidify.
33 #define STRESS_NOTREACHED() {}
34 #define STRESS_DCHECK(a) {}
35 #endif
37 } // namespace disk_cache
39 #endif // NET_DISK_CACHE_STRESS_SUPPORT_H_