Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h

Issue 2875823003: Replace RingBuffer by std::deque in RtcEventLog. (Closed)
Patch Set: Remove default-constructed members from constructor. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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
11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_ 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_ 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_
13 13
14 #include <deque>
14 #include <limits> 15 #include <limits>
15 #include <memory> 16 #include <memory>
16 #include <utility> 17 #include <utility>
17 #include <vector> 18 #include <vector>
18 19
19 #include "webrtc/base/constructormagic.h" 20 #include "webrtc/base/constructormagic.h"
20 #include "webrtc/base/event.h" 21 #include "webrtc/base/event.h"
21 #include "webrtc/base/ignore_wundef.h" 22 #include "webrtc/base/ignore_wundef.h"
22 #include "webrtc/base/platform_thread.h" 23 #include "webrtc/base/platform_thread.h"
23 #include "webrtc/base/protobuf_utils.h" 24 #include "webrtc/base/protobuf_utils.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void StartLogFile(); 89 void StartLogFile();
89 bool LogToFile(); 90 bool LogToFile();
90 void StopLogFile(); 91 void StopLogFile();
91 void ProcessEvents(); 92 void ProcessEvents();
92 93
93 // Message queues for passing events to the logging thread. 94 // Message queues for passing events to the logging thread.
94 SwapQueue<ControlMessage>* message_queue_; 95 SwapQueue<ControlMessage>* message_queue_;
95 SwapQueue<std::unique_ptr<rtclog::Event>>* event_queue_; 96 SwapQueue<std::unique_ptr<rtclog::Event>>* event_queue_;
96 97
97 // History containing the most recent events (~ 10 s). 98 // History containing the most recent events (~ 10 s).
98 RingBuffer<std::unique_ptr<rtclog::Event>> history_; 99 std::deque<std::unique_ptr<rtclog::Event>> history_;
99 100
100 // History containing all past configuration events. 101 // History containing all past configuration events.
101 std::vector<std::unique_ptr<rtclog::Event>> config_history_; 102 std::vector<std::unique_ptr<rtclog::Event>> config_history_;
102 103
103 std::unique_ptr<FileWrapper> file_; 104 std::unique_ptr<FileWrapper> file_;
104 rtc::PlatformThread thread_; 105 rtc::PlatformThread thread_;
105 106
106 int64_t max_size_bytes_; 107 int64_t max_size_bytes_;
107 int64_t written_bytes_; 108 int64_t written_bytes_;
108 int64_t start_time_; 109 int64_t start_time_;
(...skipping 10 matching lines...) Expand all
119 rtc::Event file_finished_; 120 rtc::Event file_finished_;
120 121
121 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtcEventLogHelperThread); 122 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtcEventLogHelperThread);
122 }; 123 };
123 124
124 } // namespace webrtc 125 } // namespace webrtc
125 126
126 #endif // ENABLE_RTC_EVENT_LOG 127 #endif // ENABLE_RTC_EVENT_LOG
127 128
128 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_ 129 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_HELPER_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698