Index: content/browser/media/webrtc/webrtc_internals.cc |
diff --git a/content/browser/media/webrtc/webrtc_internals.cc b/content/browser/media/webrtc/webrtc_internals.cc |
index 1ebc884a5cb0a7816f607c31ddd38dc9ebedd0b0..0255e5bb30e8b2a35efd81fd3a1455d6afc7750e 100644 |
--- a/content/browser/media/webrtc/webrtc_internals.cc |
+++ b/content/browser/media/webrtc/webrtc_internals.cc |
@@ -15,6 +15,14 @@ |
#include "content/public/browser/power_save_blocker.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/web_contents.h" |
+#include "content/public/browser/webrtc_callback_interface.h" |
+#include "ipc/ipc_platform_file.h" |
+ |
+#if defined(OS_WIN) |
+#define IntToStringType base::IntToString16 |
+#else |
+#define IntToStringType base::IntToString |
+#endif |
using base::ProcessId; |
using std::string; |
@@ -342,13 +350,14 @@ void WebRTCInternals::SetEventLogRecordings( |
event_log_recordings_ = false; |
// Tear down the dialog since the user has unchecked the audio debug |
// recordings box. |
- select_file_dialog_ = nullptr; |
DCHECK(select_file_dialog_->HasOneRef()); |
+ select_file_dialog_ = nullptr; |
for (RenderProcessHost::iterator i( |
content::RenderProcessHost::AllHostsIterator()); |
!i.IsAtEnd(); i.Advance()) { |
- i.GetCurrentValue()->DisableEventLogRecordings(); |
+ int rid = i.GetCurrentValue()->GetID(); |
+ WebRTCCallbackInterface::GetInstance()->StopEventLog(rid); |
} |
} |
#endif |
@@ -359,11 +368,6 @@ bool WebRTCInternals::IsEventLogRecordingsEnabled() const { |
return event_log_recordings_; |
} |
-const base::FilePath& WebRTCInternals::GetEventLogRecordingsFilePath() const { |
- DCHECK_CURRENTLY_ON(BrowserThread::UI); |
- return event_log_recordings_file_path_; |
-} |
- |
void WebRTCInternals::SendUpdate(const string& command, |
std::unique_ptr<base::Value> value) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
@@ -486,8 +490,9 @@ void WebRTCInternals::EnableEventLogRecordingsOnAllRenderProcessHosts() { |
for (RenderProcessHost::iterator i( |
content::RenderProcessHost::AllHostsIterator()); |
!i.IsAtEnd(); i.Advance()) { |
- i.GetCurrentValue()->EnableEventLogRecordings( |
- event_log_recordings_file_path_); |
+ int rid = i.GetCurrentValue()->GetID(); |
+ WebRTCCallbackInterface::GetInstance()->StartEventLog( |
+ rid, event_log_recordings_file_path_); |
} |
} |
#endif |