OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "base/trace_event/trace_log.h" | 5 #include "base/trace_event/trace_log.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 if (!flush_output_callback.is_null()) { | 964 if (!flush_output_callback.is_null()) { |
965 scoped_refptr<RefCountedString> empty_result = new RefCountedString; | 965 scoped_refptr<RefCountedString> empty_result = new RefCountedString; |
966 flush_output_callback.Run(empty_result, false); | 966 flush_output_callback.Run(empty_result, false); |
967 } | 967 } |
968 return; | 968 return; |
969 } | 969 } |
970 | 970 |
971 if (use_worker_thread_) { | 971 if (use_worker_thread_) { |
972 base::PostTaskWithTraits( | 972 base::PostTaskWithTraits( |
973 FROM_HERE, | 973 FROM_HERE, |
974 base::TaskTraits() | 974 {MayBlock(), TaskPriority::BACKGROUND, |
975 .MayBlock() | 975 TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, |
976 .WithPriority(base::TaskPriority::BACKGROUND) | |
977 .WithShutdownBehavior( | |
978 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), | |
979 BindOnce(&TraceLog::ConvertTraceEventsToTraceFormat, | 976 BindOnce(&TraceLog::ConvertTraceEventsToTraceFormat, |
980 Passed(&previous_logged_events), flush_output_callback, | 977 Passed(&previous_logged_events), flush_output_callback, |
981 argument_filter_predicate)); | 978 argument_filter_predicate)); |
982 return; | 979 return; |
983 } | 980 } |
984 | 981 |
985 ConvertTraceEventsToTraceFormat(std::move(previous_logged_events), | 982 ConvertTraceEventsToTraceFormat(std::move(previous_logged_events), |
986 flush_output_callback, | 983 flush_output_callback, |
987 argument_filter_predicate); | 984 argument_filter_predicate); |
988 } | 985 } |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 } | 1732 } |
1736 | 1733 |
1737 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { | 1734 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { |
1738 if (*category_group_enabled_) { | 1735 if (*category_group_enabled_) { |
1739 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, | 1736 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, |
1740 event_handle_); | 1737 event_handle_); |
1741 } | 1738 } |
1742 } | 1739 } |
1743 | 1740 |
1744 } // namespace trace_event_internal | 1741 } // namespace trace_event_internal |
OLD | NEW |