Index: webrtc/call/rtc_event_log_helper_thread.cc |
diff --git a/webrtc/call/rtc_event_log_helper_thread.cc b/webrtc/call/rtc_event_log_helper_thread.cc |
index 6479908e62c2ce4d8be18a13477d6a96078be7e9..b1b6990a2449862fb8dfe0e7cff54d1c4486859b 100644 |
--- a/webrtc/call/rtc_event_log_helper_thread.cc |
+++ b/webrtc/call/rtc_event_log_helper_thread.cc |
@@ -107,7 +107,7 @@ bool RtcEventLogHelperThread::AppendEventToString(rtclog::Event* event) { |
} |
bool RtcEventLogHelperThread::LogToMemory() { |
- RTC_DCHECK(!file_->Open()); |
+ RTC_DCHECK(!file_->is_open()); |
bool message_received = false; |
// Process each event earlier than the current time and append it to the |
@@ -130,7 +130,7 @@ bool RtcEventLogHelperThread::LogToMemory() { |
} |
void RtcEventLogHelperThread::StartLogFile() { |
- RTC_DCHECK(file_->Open()); |
+ RTC_DCHECK(file_->is_open()); |
bool stop = false; |
output_string_.clear(); |
@@ -157,7 +157,7 @@ void RtcEventLogHelperThread::StartLogFile() { |
if (!file_->Write(output_string_.data(), output_string_.size())) { |
LOG(LS_ERROR) << "FileWrapper failed to write WebRtcEventLog file."; |
// The current FileWrapper implementation closes the file on error. |
- RTC_DCHECK(!file_->Open()); |
+ RTC_DCHECK(!file_->is_open()); |
return; |
} |
written_bytes_ += output_string_.size(); |
@@ -168,13 +168,13 @@ void RtcEventLogHelperThread::StartLogFile() { |
output_string_.shrink_to_fit(); |
if (stop) { |
- RTC_DCHECK(file_->Open()); |
+ RTC_DCHECK(file_->is_open()); |
StopLogFile(); |
} |
} |
bool RtcEventLogHelperThread::LogToFile() { |
- RTC_DCHECK(file_->Open()); |
+ RTC_DCHECK(file_->is_open()); |
output_string_.clear(); |
bool message_received = false; |
@@ -202,7 +202,7 @@ bool RtcEventLogHelperThread::LogToFile() { |
if (!file_->Write(output_string_.data(), output_string_.size())) { |
LOG(LS_ERROR) << "FileWrapper failed to write WebRtcEventLog file."; |
// The current FileWrapper implementation closes the file on error. |
- RTC_DCHECK(!file_->Open()); |
+ RTC_DCHECK(!file_->is_open()); |
return message_received; |
} |
written_bytes_ += output_string_.size(); |
@@ -213,14 +213,14 @@ bool RtcEventLogHelperThread::LogToFile() { |
// having more events in the queue. |
if ((has_recent_event_ && most_recent_event_->timestamp_us() > stop_time_) || |
stop) { |
- RTC_DCHECK(file_->Open()); |
+ RTC_DCHECK(file_->is_open()); |
StopLogFile(); |
} |
return message_received; |
} |
void RtcEventLogHelperThread::StopLogFile() { |
- RTC_DCHECK(file_->Open()); |
+ RTC_DCHECK(file_->is_open()); |
output_string_.clear(); |
rtclog::Event end_event; |
@@ -233,7 +233,7 @@ void RtcEventLogHelperThread::StopLogFile() { |
if (!file_->Write(output_string_.data(), output_string_.size())) { |
LOG(LS_ERROR) << "FileWrapper failed to write WebRtcEventLog file."; |
// The current FileWrapper implementation closes the file on error. |
- RTC_DCHECK(!file_->Open()); |
+ RTC_DCHECK(!file_->is_open()); |
} |
written_bytes_ += output_string_.size(); |
} |
@@ -244,7 +244,7 @@ void RtcEventLogHelperThread::StopLogFile() { |
stop_time_ = std::numeric_limits<int64_t>::max(); |
output_string_.clear(); |
file_->CloseFile(); |
- RTC_DCHECK(!file_->Open()); |
+ RTC_DCHECK(!file_->is_open()); |
} |
void RtcEventLogHelperThread::ProcessEvents() { |
@@ -256,7 +256,7 @@ void RtcEventLogHelperThread::ProcessEvents() { |
while (message_queue_->Remove(&message)) { |
switch (message.message_type) { |
case ControlMessage::START_FILE: |
- if (!file_->Open()) { |
+ if (!file_->is_open()) { |
max_size_bytes_ = message.max_size_bytes; |
start_time_ = message.start_time; |
stop_time_ = message.stop_time; |
@@ -269,19 +269,19 @@ void RtcEventLogHelperThread::ProcessEvents() { |
message_received = true; |
break; |
case ControlMessage::STOP_FILE: |
- if (file_->Open()) { |
+ if (file_->is_open()) { |
stop_time_ = message.stop_time; |
LogToFile(); // Log remaining events from message queues. |
} |
// LogToFile might stop on it's own so we need to recheck the state. |
- if (file_->Open()) { |
+ if (file_->is_open()) { |
StopLogFile(); |
} |
file_finished_.Set(); |
message_received = true; |
break; |
case ControlMessage::TERMINATE_THREAD: |
- if (file_->Open()) { |
+ if (file_->is_open()) { |
StopLogFile(); |
} |
return; |
@@ -289,7 +289,7 @@ void RtcEventLogHelperThread::ProcessEvents() { |
} |
// Write events to file or memory. |
- if (file_->Open()) { |
+ if (file_->is_open()) { |
message_received |= LogToFile(); |
} else { |
message_received |= LogToMemory(); |