OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file provides support for basic in-memory tracing of short events. We | 5 // This file provides support for basic in-memory tracing of short events. We |
6 // keep a static circular buffer where we store the last traced events, so we | 6 // keep a static circular buffer where we store the last traced events, so we |
7 // can review the cache recent behavior should we need it. | 7 // can review the cache recent behavior should we need it. |
8 | 8 |
9 #ifndef NET_DISK_CACHE_TRACE_H__ | 9 #ifndef NET_DISK_CACHE_TRACE_H__ |
10 #define NET_DISK_CACHE_TRACE_H__ | 10 #define NET_DISK_CACHE_TRACE_H__ |
11 | 11 |
(...skipping 17 matching lines...) Expand all Loading... |
29 static TraceObject* GetTraceObject(); | 29 static TraceObject* GetTraceObject(); |
30 | 30 |
31 private: | 31 private: |
32 TraceObject() { | 32 TraceObject() { |
33 InitTrace(); | 33 InitTrace(); |
34 } | 34 } |
35 | 35 |
36 ~TraceObject() { | 36 ~TraceObject() { |
37 DestroyTrace(); | 37 DestroyTrace(); |
38 } | 38 } |
39 DISALLOW_EVIL_CONSTRUCTORS(TraceObject); | 39 DISALLOW_COPY_AND_ASSIGN(TraceObject); |
40 }; | 40 }; |
41 | 41 |
42 // Traces to the internal buffer. | 42 // Traces to the internal buffer. |
43 void Trace(const char* format, ...); | 43 void Trace(const char* format, ...); |
44 | 44 |
45 } // namespace disk_cache | 45 } // namespace disk_cache |
46 | 46 |
47 #endif // NET_DISK_CACHE_TRACE_H__ | 47 #endif // NET_DISK_CACHE_TRACE_H__ |
OLD | NEW |