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 #include "base/debug/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 << "Cannot manipulate TraceLog::Enabled state from an observer."; | 970 << "Cannot manipulate TraceLog::Enabled state from an observer."; |
971 return; | 971 return; |
972 } | 972 } |
973 | 973 |
974 if (sampling_thread_.get()) { | 974 if (sampling_thread_.get()) { |
975 // Stop the sampling thread. | 975 // Stop the sampling thread. |
976 sampling_thread_->Stop(); | 976 sampling_thread_->Stop(); |
977 lock_.Release(); | 977 lock_.Release(); |
978 PlatformThread::Join(sampling_thread_handle_); | 978 PlatformThread::Join(sampling_thread_handle_); |
979 lock_.Acquire(); | 979 lock_.Acquire(); |
980 sampling_thread_handle_ = 0; | 980 sampling_thread_handle_ = PlatformThreadHandle(); |
981 sampling_thread_.reset(); | 981 sampling_thread_.reset(); |
982 } | 982 } |
983 | 983 |
984 dispatching_to_observer_list_ = true; | 984 dispatching_to_observer_list_ = true; |
985 FOR_EACH_OBSERVER(EnabledStateChangedObserver, | 985 FOR_EACH_OBSERVER(EnabledStateChangedObserver, |
986 enabled_state_observer_list_, | 986 enabled_state_observer_list_, |
987 OnTraceLogWillDisable()); | 987 OnTraceLogWillDisable()); |
988 dispatching_to_observer_list_ = false; | 988 dispatching_to_observer_list_ = false; |
989 | 989 |
990 category_filter_.Clear(); | 990 category_filter_.Clear(); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 NULL, // arg_names | 1502 NULL, // arg_names |
1503 NULL, // arg_types | 1503 NULL, // arg_types |
1504 NULL, // arg_values | 1504 NULL, // arg_values |
1505 NULL, // convertable values | 1505 NULL, // convertable values |
1506 TRACE_EVENT_FLAG_NONE); // flags | 1506 TRACE_EVENT_FLAG_NONE); // flags |
1507 } | 1507 } |
1508 } | 1508 } |
1509 | 1509 |
1510 } // namespace trace_event_internal | 1510 } // namespace trace_event_internal |
1511 | 1511 |
OLD | NEW |