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 under third_party_mods/chromium or at: | 3 // found in the LICENSE file under third_party_mods/chromium or at: |
4 // http://src.chromium.org/svn/trunk/src/LICENSE | 4 // http://src.chromium.org/svn/trunk/src/LICENSE |
5 | 5 |
6 #ifndef WEBRTC_BASE_TRACE_EVENT_H_ | 6 #ifndef WEBRTC_BASE_TRACE_EVENT_H_ |
7 #define WEBRTC_BASE_TRACE_EVENT_H_ | 7 #define WEBRTC_BASE_TRACE_EVENT_H_ |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 : data_(static_cast<unsigned long long>(id)) {} | 694 : data_(static_cast<unsigned long long>(id)) {} |
695 | 695 |
696 unsigned long long data() const { return data_; } | 696 unsigned long long data() const { return data_; } |
697 | 697 |
698 private: | 698 private: |
699 unsigned long long data_; | 699 unsigned long long data_; |
700 }; | 700 }; |
701 | 701 |
702 explicit TraceID(const void* id, unsigned char* flags) | 702 explicit TraceID(const void* id, unsigned char* flags) |
703 : data_(static_cast<unsigned long long>( | 703 : data_(static_cast<unsigned long long>( |
704 reinterpret_cast<unsigned long>(id))) { | 704 reinterpret_cast<uintptr_t>(id))) { |
705 *flags |= TRACE_EVENT_FLAG_MANGLE_ID; | 705 *flags |= TRACE_EVENT_FLAG_MANGLE_ID; |
706 } | 706 } |
707 explicit TraceID(ForceMangle id, unsigned char* flags) : data_(id.data()) { | 707 explicit TraceID(ForceMangle id, unsigned char* flags) : data_(id.data()) { |
708 *flags |= TRACE_EVENT_FLAG_MANGLE_ID; | 708 *flags |= TRACE_EVENT_FLAG_MANGLE_ID; |
709 } | 709 } |
710 explicit TraceID(unsigned long long id, unsigned char* flags) | 710 explicit TraceID(unsigned long long id, unsigned char* flags) |
711 : data_(id) { (void)flags; } | 711 : data_(id) { (void)flags; } |
712 explicit TraceID(unsigned long id, unsigned char* flags) | 712 explicit TraceID(unsigned long id, unsigned char* flags) |
713 : data_(id) { (void)flags; } | 713 : data_(id) { (void)flags; } |
714 explicit TraceID(unsigned int id, unsigned char* flags) | 714 explicit TraceID(unsigned int id, unsigned char* flags) |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 const char* name; | 907 const char* name; |
908 }; | 908 }; |
909 Data* p_data_; | 909 Data* p_data_; |
910 Data data_; | 910 Data data_; |
911 }; | 911 }; |
912 | 912 |
913 } // namespace trace_event_internal | 913 } // namespace trace_event_internal |
914 } // namespace webrtc | 914 } // namespace webrtc |
915 | 915 |
916 #endif // WEBRTC_BASE_TRACE_EVENT_H_ | 916 #endif // WEBRTC_BASE_TRACE_EVENT_H_ |
OLD | NEW |