OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 5 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void WebRtcLoggingHandlerHost::LogMessage(const std::string& message) { | 217 void WebRtcLoggingHandlerHost::LogMessage(const std::string& message) { |
218 BrowserThread::PostTask( | 218 BrowserThread::PostTask( |
219 BrowserThread::IO, | 219 BrowserThread::IO, |
220 FROM_HERE, | 220 FROM_HERE, |
221 base::Bind( | 221 base::Bind( |
222 &WebRtcLoggingHandlerHost::AddLogMessageFromBrowser, | 222 &WebRtcLoggingHandlerHost::AddLogMessageFromBrowser, |
223 this, | 223 this, |
224 WebRtcLoggingMessageData(base::Time::Now(), message))); | 224 WebRtcLoggingMessageData(base::Time::Now(), message))); |
225 } | 225 } |
226 | 226 |
| 227 void WebRtcLoggingHandlerHost::StartRtpDump( |
| 228 bool incoming, |
| 229 bool outgoing, |
| 230 const GenericDoneCallback& callback) { |
| 231 NOTIMPLEMENTED(); |
| 232 } |
| 233 |
| 234 void WebRtcLoggingHandlerHost::StopRtpDump( |
| 235 bool incoming, |
| 236 bool outgoing, |
| 237 const GenericDoneCallback& callback) { |
| 238 NOTIMPLEMENTED(); |
| 239 } |
| 240 |
227 void WebRtcLoggingHandlerHost::OnChannelClosing() { | 241 void WebRtcLoggingHandlerHost::OnChannelClosing() { |
228 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 242 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
229 if (logging_state_ == STARTED || logging_state_ == STOPPED) { | 243 if (logging_state_ == STARTED || logging_state_ == STOPPED) { |
230 if (upload_log_on_render_close_) { | 244 if (upload_log_on_render_close_) { |
231 logging_state_ = STOPPED; | 245 logging_state_ = STOPPED; |
232 logging_started_time_ = base::Time(); | 246 logging_started_time_ = base::Time(); |
233 content::BrowserThread::PostTaskAndReplyWithResult( | 247 content::BrowserThread::PostTaskAndReplyWithResult( |
234 content::BrowserThread::FILE, | 248 content::BrowserThread::FILE, |
235 FROM_HERE, | 249 FROM_HERE, |
236 base::Bind(&WebRtcLoggingHandlerHost::GetLogDirectoryAndEnsureExists, | 250 base::Bind(&WebRtcLoggingHandlerHost::GetLogDirectoryAndEnsureExists, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 void WebRtcLoggingHandlerHost::FireGenericDoneCallback( | 475 void WebRtcLoggingHandlerHost::FireGenericDoneCallback( |
462 GenericDoneCallback* callback, bool success, | 476 GenericDoneCallback* callback, bool success, |
463 const std::string& error_message) { | 477 const std::string& error_message) { |
464 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 478 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
465 DCHECK(!(*callback).is_null()); | 479 DCHECK(!(*callback).is_null()); |
466 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, | 480 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, |
467 base::Bind(*callback, success, | 481 base::Bind(*callback, success, |
468 error_message)); | 482 error_message)); |
469 (*callback).Reset(); | 483 (*callback).Reset(); |
470 } | 484 } |
OLD | NEW |