Commit 1647f931 authored by Henrik Grunell's avatar Henrik Grunell Committed by Commit Bot

Check log state before storing WebRTC log.

Bug: 807547
Change-Id: Ie8374888ddfa5e81f4920dbbf9fe6bb35d7fadc4
Reviewed-on: https://chromium-review.googlesource.com/1181266
Commit-Queue: Henrik Grunell <grunell@chromium.org>
Reviewed-by: default avatarTommi <tommi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584753}
parent 0814dbad
......@@ -454,6 +454,16 @@ void WebRtcLoggingHandlerHost::StoreLogInDirectory(
const GenericDoneCallback& done_callback,
const base::FilePath& directory) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (text_log_handler_->GetState() != WebRtcTextLogHandler::STOPPED &&
text_log_handler_->GetState() != WebRtcTextLogHandler::CHANNEL_CLOSING) {
BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::BindOnce(done_callback, false,
"Logging not stopped or no log open."));
return;
}
log_paths->log_path = directory;
std::unique_ptr<WebRtcLogBuffer> log_buffer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment