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

Unified Diff: webrtc/system_wrappers/source/trace_posix.cc

Issue 2779623002: remove more CriticalSectionWrappers. (Closed)
Patch Set: rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/system_wrappers/source/trace_posix.h ('k') | webrtc/test/fake_network_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/trace_posix.cc
diff --git a/webrtc/system_wrappers/source/trace_posix.cc b/webrtc/system_wrappers/source/trace_posix.cc
index cb702d8cea19457347e568a185eb7c4a85c00a8b..f181ad2177d907e3a60b4669d804430901932b18 100644
--- a/webrtc/system_wrappers/source/trace_posix.cc
+++ b/webrtc/system_wrappers/source/trace_posix.cc
@@ -19,17 +19,12 @@
namespace webrtc {
-TracePosix::TracePosix()
- : crit_sect_(*CriticalSectionWrapper::CreateCriticalSection()) {
+TracePosix::TracePosix() {
struct timeval system_time_high_res;
gettimeofday(&system_time_high_res, 0);
prev_api_tick_count_ = prev_tick_count_ = system_time_high_res.tv_sec;
}
-TracePosix::~TracePosix() {
- delete &crit_sect_;
-}
-
int32_t TracePosix::AddTime(char* trace_message, const TraceLevel level) const {
struct timeval system_time_high_res;
if (gettimeofday(&system_time_high_res, 0) == -1) {
@@ -42,7 +37,7 @@ int32_t TracePosix::AddTime(char* trace_message, const TraceLevel level) const {
const uint32_t ms_time = system_time_high_res.tv_usec / 1000;
uint32_t prev_tickCount = 0;
{
- CriticalSectionScoped lock(&crit_sect_);
+ rtc::CritScope lock(&crit_sect_);
if (level == kTraceApiCall) {
prev_tickCount = prev_tick_count_;
prev_tick_count_ = ms_time;
« no previous file with comments | « webrtc/system_wrappers/source/trace_posix.h ('k') | webrtc/test/fake_network_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698