- add sources.
[platform/framework/web/crosswalk.git] / src / net / disk_cache / stress_support.h
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.
4
5 #ifndef NET_DISK_CACHE_STRESS_SUPPORT_H_
6 #define NET_DISK_CACHE_STRESS_SUPPORT_H_
7
8 #include "base/logging.h"
9
10 namespace disk_cache {
11
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
15
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
20
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
25
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
36
37 }  // namespace disk_cache
38
39 #endif  // NET_DISK_CACHE_STRESS_SUPPORT_H_