OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // OS-imposed limits on open files and/or threads/task-queues. | 161 // OS-imposed limits on open files and/or threads/task-queues. |
162 // TODO(eladalon): Known issue - there's a race over |log_count_|. | 162 // TODO(eladalon): Known issue - there's a race over |log_count_|. |
163 static std::atomic<int> log_count_; | 163 static std::atomic<int> log_count_; |
164 | 164 |
165 // Make sure that the event log is "managed" - created/destroyed, as well | 165 // Make sure that the event log is "managed" - created/destroyed, as well |
166 // as started/stopped - from the same thread/task-queue. | 166 // as started/stopped - from the same thread/task-queue. |
167 rtc::SequencedTaskChecker owner_sequence_checker_; | 167 rtc::SequencedTaskChecker owner_sequence_checker_; |
168 | 168 |
169 // History containing all past configuration events. | 169 // History containing all past configuration events. |
170 std::vector<std::unique_ptr<rtclog::Event>> config_history_ | 170 std::vector<std::unique_ptr<rtclog::Event>> config_history_ |
171 ACCESS_ON(task_queue_); | 171 RTC_ACCESS_ON(task_queue_); |
172 | 172 |
173 // History containing the most recent (non-configuration) events (~10s). | 173 // History containing the most recent (non-configuration) events (~10s). |
174 std::deque<std::unique_ptr<rtclog::Event>> history_ ACCESS_ON(task_queue_); | 174 std::deque<std::unique_ptr<rtclog::Event>> history_ |
| 175 RTC_ACCESS_ON(task_queue_); |
175 | 176 |
176 std::unique_ptr<FileWrapper> file_ ACCESS_ON(task_queue_); | 177 std::unique_ptr<FileWrapper> file_ RTC_ACCESS_ON(task_queue_); |
177 | 178 |
178 size_t max_size_bytes_ ACCESS_ON(task_queue_); | 179 size_t max_size_bytes_ RTC_ACCESS_ON(task_queue_); |
179 size_t written_bytes_ ACCESS_ON(task_queue_); | 180 size_t written_bytes_ RTC_ACCESS_ON(task_queue_); |
180 | 181 |
181 // Keep this last to ensure it destructs first, or else tasks living on the | 182 // Keep this last to ensure it destructs first, or else tasks living on the |
182 // queue might access other members after they've been torn down. | 183 // queue might access other members after they've been torn down. |
183 rtc::TaskQueue task_queue_; | 184 rtc::TaskQueue task_queue_; |
184 | 185 |
185 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogImpl); | 186 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogImpl); |
186 }; | 187 }; |
187 | 188 |
188 namespace { | 189 namespace { |
189 // The functions in this namespace convert enums from the runtime format | 190 // The functions in this namespace convert enums from the runtime format |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 #else | 840 #else |
840 return CreateNull(); | 841 return CreateNull(); |
841 #endif // ENABLE_RTC_EVENT_LOG | 842 #endif // ENABLE_RTC_EVENT_LOG |
842 } | 843 } |
843 | 844 |
844 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { | 845 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { |
845 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 846 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |
846 } | 847 } |
847 | 848 |
848 } // namespace webrtc | 849 } // namespace webrtc |
OLD | NEW |