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..5fcb6fc05cf9d2b435268f25a03bb9366d9908ca 100644 |
--- a/content/browser/media/webrtc/webrtc_internals.cc |
+++ b/content/browser/media/webrtc/webrtc_internals.cc |
@@ -9,12 +9,19 @@ |
#include "base/strings/string_number_conversions.h" |
#include "build/build_config.h" |
#include "content/browser/media/webrtc/webrtc_internals_ui_observer.h" |
+#include "content/browser/renderer_host/render_process_host_impl.h" |
#include "content/browser/web_contents/web_contents_view.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/content_browser_client.h" |
#include "content/public/browser/power_save_blocker.h" |
-#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/web_contents.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 +349,15 @@ 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()); |
tommi (sloooow) - chröme
2016/05/25 15:16:21
yikes. shows the value of testing with dcheck enab
Ivo-OOO until feb 6
2016/05/30 15:04:15
Indeed.
|
+ select_file_dialog_ = nullptr; |
for (RenderProcessHost::iterator i( |
content::RenderProcessHost::AllHostsIterator()); |
!i.IsAtEnd(); i.Advance()) { |
- i.GetCurrentValue()->DisableEventLogRecordings(); |
+ RenderProcessHostImpl* rph = |
+ static_cast<RenderProcessHostImpl*>(i.GetCurrentValue()); |
tommi (sloooow) - chröme
2016/05/25 15:16:21
this feels hacky. How can you be sure that this i
ncarter (slow)
2016/05/25 21:28:58
As tommi suggests, this is an illegal cast. In con
Ivo-OOO until feb 6
2016/05/30 15:04:15
Good points, removed the cast since it's not neces
|
+ rph->StopWebRTCEventLog(); |
} |
} |
#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_); |
+ RenderProcessHostImpl* rph = |
+ static_cast<RenderProcessHostImpl*>(i.GetCurrentValue()); |
tommi (sloooow) - chröme
2016/05/25 15:16:21
same here
Ivo-OOO until feb 6
2016/05/30 15:04:15
Removed here as well.
|
+ rph->StartWebRTCEventLog(event_log_recordings_file_path_); |
} |
} |
#endif |