OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 5 |
6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
8 | 8 |
9 #include <stack> | 9 #include <stack> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/atomicops.h" | 13 #include "base/atomicops.h" |
14 #include "base/base_export.h" | 14 #include "base/base_export.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/memory/ref_counted_memory.h" | 18 #include "base/memory/ref_counted_memory.h" |
19 #include "base/memory/scoped_vector.h" | 19 #include "base/memory/scoped_vector.h" |
| 20 #include "base/memory/weak_ptr.h" |
20 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
21 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
22 #include "base/synchronization/condition_variable.h" | 23 #include "base/synchronization/condition_variable.h" |
23 #include "base/synchronization/lock.h" | 24 #include "base/synchronization/lock.h" |
24 #include "base/threading/thread.h" | 25 #include "base/threading/thread.h" |
25 #include "base/threading/thread_local.h" | 26 #include "base/threading/thread_local.h" |
26 #include "base/timer/timer.h" | 27 #include "base/timer/timer.h" |
27 | 28 |
28 // Older style trace macros with explicit id and extra data | 29 // Older style trace macros with explicit id and extra data |
29 // Only these macros result in publishing data to ETW as currently implemented. | 30 // Only these macros result in publishing data to ETW as currently implemented. |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 // For events which can't be added into the thread local buffer, e.g. events | 806 // For events which can't be added into the thread local buffer, e.g. events |
806 // from threads without a message loop. | 807 // from threads without a message loop. |
807 scoped_ptr<TraceBufferChunk> thread_shared_chunk_; | 808 scoped_ptr<TraceBufferChunk> thread_shared_chunk_; |
808 size_t thread_shared_chunk_index_; | 809 size_t thread_shared_chunk_index_; |
809 | 810 |
810 // Set when asynchronous Flush is in progress. | 811 // Set when asynchronous Flush is in progress. |
811 OutputCallback flush_output_callback_; | 812 OutputCallback flush_output_callback_; |
812 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; | 813 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; |
813 subtle::AtomicWord generation_; | 814 subtle::AtomicWord generation_; |
814 | 815 |
| 816 base::WeakPtrFactory<TraceLog> weak_ptr_factory_; |
| 817 |
815 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 818 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
816 }; | 819 }; |
817 | 820 |
818 } // namespace debug | 821 } // namespace debug |
819 } // namespace base | 822 } // namespace base |
820 | 823 |
821 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 824 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
OLD | NEW |