| 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> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 name, reinterpret_cast<const void*>(id), extra) | 38 name, reinterpret_cast<const void*>(id), extra) |
| 39 | 39 |
| 40 #define TRACE_EVENT_INSTANT_ETW(name, id, extra) \ | 40 #define TRACE_EVENT_INSTANT_ETW(name, id, extra) \ |
| 41 base::debug::TraceLog::AddTraceEventEtw( \ | 41 base::debug::TraceLog::AddTraceEventEtw( \ |
| 42 TRACE_EVENT_PHASE_INSTANT, \ | 42 TRACE_EVENT_PHASE_INSTANT, \ |
| 43 name, reinterpret_cast<const void*>(id), extra) | 43 name, reinterpret_cast<const void*>(id), extra) |
| 44 | 44 |
| 45 template <typename Type> | 45 template <typename Type> |
| 46 struct DefaultSingletonTraits; | 46 struct DefaultSingletonTraits; |
| 47 | 47 |
| 48 #if defined(COMPILER_GCC) | |
| 49 namespace BASE_HASH_NAMESPACE { | |
| 50 template <> | |
| 51 struct hash<base::MessageLoop*> { | |
| 52 std::size_t operator()(base::MessageLoop* value) const { | |
| 53 return reinterpret_cast<std::size_t>(value); | |
| 54 } | |
| 55 }; | |
| 56 } // BASE_HASH_NAMESPACE | |
| 57 #endif | |
| 58 | |
| 59 namespace base { | 48 namespace base { |
| 60 | 49 |
| 61 class WaitableEvent; | 50 class WaitableEvent; |
| 62 class MessageLoop; | 51 class MessageLoop; |
| 63 | 52 |
| 64 namespace debug { | 53 namespace debug { |
| 65 | 54 |
| 66 // For any argument of type TRACE_VALUE_TYPE_CONVERTABLE the provided | 55 // For any argument of type TRACE_VALUE_TYPE_CONVERTABLE the provided |
| 67 // class must implement this interface. | 56 // class must implement this interface. |
| 68 class BASE_EXPORT ConvertableToTraceFormat | 57 class BASE_EXPORT ConvertableToTraceFormat |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; | 801 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; |
| 813 subtle::AtomicWord generation_; | 802 subtle::AtomicWord generation_; |
| 814 | 803 |
| 815 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 804 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 816 }; | 805 }; |
| 817 | 806 |
| 818 } // namespace debug | 807 } // namespace debug |
| 819 } // namespace base | 808 } // namespace base |
| 820 | 809 |
| 821 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 810 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
| OLD | NEW |