| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index 9215b6dcf189491576d2b660e8c4a2579665f072..82a5eaa4a4d3342db428ec4c45bcbac97bdbb360 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -244,8 +244,6 @@ const char kSiteProcessMapKeyName[] = "content_site_process_map";
|
| #ifdef ENABLE_WEBRTC
|
| const base::FilePath::CharType kAecDumpFileNameAddition[] =
|
| FILE_PATH_LITERAL("aec_dump");
|
| -const base::FilePath::CharType kEventLogFileNameAddition[] =
|
| - FILE_PATH_LITERAL("event_log");
|
| #endif
|
|
|
| void CacheShaderInfo(int32_t id, base::FilePath path) {
|
| @@ -1767,12 +1765,8 @@ bool RenderProcessHostImpl::OnMessageReceived(const IPC::Message& msg) {
|
| #if defined(ENABLE_WEBRTC)
|
| IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer,
|
| OnRegisterAecDumpConsumer)
|
| - IPC_MESSAGE_HANDLER(WebRTCEventLogMsg_RegisterEventLogConsumer,
|
| - OnRegisterEventLogConsumer)
|
| IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer,
|
| OnUnregisterAecDumpConsumer)
|
| - IPC_MESSAGE_HANDLER(WebRTCEventLogMsg_UnregisterEventLogConsumer,
|
| - OnUnregisterEventLogConsumer)
|
| #endif
|
| // Adding single handlers for your service here is fine, but once your
|
| // service needs more than one handler, please extract them into a new
|
| @@ -2040,28 +2034,6 @@ void RenderProcessHostImpl::DisableAudioDebugRecordings() {
|
| }
|
| }
|
|
|
| -void RenderProcessHostImpl::EnableEventLogRecordings(
|
| - const base::FilePath& file) {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| -
|
| - // Enable Event log for each registered consumer.
|
| - base::FilePath file_with_extensions = GetEventLogFilePathWithExtensions(file);
|
| - for (int id : aec_dump_consumers_)
|
| - EnableEventLogForId(file_with_extensions, id);
|
| -}
|
| -
|
| -void RenderProcessHostImpl::DisableEventLogRecordings() {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| -
|
| - // Posting on the FILE thread and then replying back on the UI thread is only
|
| - // for avoiding races between enable and disable. Nothing is done on the FILE
|
| - // thread.
|
| - BrowserThread::PostTaskAndReply(
|
| - BrowserThread::FILE, FROM_HERE, base::Bind(&base::DoNothing),
|
| - base::Bind(&RenderProcessHostImpl::SendDisableEventLogToRenderer,
|
| - weak_factory_.GetWeakPtr()));
|
| -}
|
| -
|
| void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
|
| base::Callback<void(const std::string&)> callback) {
|
| #if defined(ENABLE_WEBRTC)
|
| @@ -2656,13 +2628,6 @@ void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) {
|
| weak_factory_.GetWeakPtr(), id));
|
| }
|
|
|
| -void RenderProcessHostImpl::OnRegisterEventLogConsumer(int id) {
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - base::Bind(&RenderProcessHostImpl::RegisterEventLogConsumerOnUIThread,
|
| - weak_factory_.GetWeakPtr(), id));
|
| -}
|
| -
|
| void RenderProcessHostImpl::OnUnregisterAecDumpConsumer(int id) {
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| @@ -2670,13 +2635,6 @@ void RenderProcessHostImpl::OnUnregisterAecDumpConsumer(int id) {
|
| weak_factory_.GetWeakPtr(), id));
|
| }
|
|
|
| -void RenderProcessHostImpl::OnUnregisterEventLogConsumer(int id) {
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - base::Bind(&RenderProcessHostImpl::UnregisterEventLogConsumerOnUIThread,
|
| - weak_factory_.GetWeakPtr(), id));
|
| -}
|
| -
|
| void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| aec_dump_consumers_.push_back(id);
|
| @@ -2688,17 +2646,6 @@ void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) {
|
| }
|
| }
|
|
|
| -void RenderProcessHostImpl::RegisterEventLogConsumerOnUIThread(int id) {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| - aec_dump_consumers_.push_back(id);
|
| -
|
| - if (WebRTCInternals::GetInstance()->IsEventLogRecordingsEnabled()) {
|
| - base::FilePath file_with_extensions = GetEventLogFilePathWithExtensions(
|
| - WebRTCInternals::GetInstance()->GetEventLogRecordingsFilePath());
|
| - EnableEventLogForId(file_with_extensions, id);
|
| - }
|
| -}
|
| -
|
| void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
|
| @@ -2710,17 +2657,6 @@ void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) {
|
| }
|
| }
|
|
|
| -void RenderProcessHostImpl::UnregisterEventLogConsumerOnUIThread(int id) {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| - for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
|
| - it != aec_dump_consumers_.end(); ++it) {
|
| - if (*it == id) {
|
| - aec_dump_consumers_.erase(it);
|
| - break;
|
| - }
|
| - }
|
| -}
|
| -
|
| void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file,
|
| int id) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| @@ -2732,17 +2668,6 @@ void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file,
|
| weak_factory_.GetWeakPtr(), id));
|
| }
|
|
|
| -void RenderProcessHostImpl::EnableEventLogForId(const base::FilePath& file,
|
| - int id) {
|
| - DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| - BrowserThread::PostTaskAndReplyWithResult(
|
| - BrowserThread::FILE, FROM_HERE,
|
| - base::Bind(&CreateFileForProcess, file.AddExtension(IntToStringType(id)),
|
| - GetHandle()),
|
| - base::Bind(&RenderProcessHostImpl::SendEventLogFileToRenderer,
|
| - weak_factory_.GetWeakPtr(), id));
|
| -}
|
| -
|
| void RenderProcessHostImpl::SendAecDumpFileToRenderer(
|
| int id,
|
| IPC::PlatformFileForTransit file_for_transit) {
|
| @@ -2751,33 +2676,15 @@ void RenderProcessHostImpl::SendAecDumpFileToRenderer(
|
| Send(new AecDumpMsg_EnableAecDump(id, file_for_transit));
|
| }
|
|
|
| -void RenderProcessHostImpl::SendEventLogFileToRenderer(
|
| - int id,
|
| - IPC::PlatformFileForTransit file_for_transit) {
|
| - if (file_for_transit == IPC::InvalidPlatformFileForTransit())
|
| - return;
|
| - Send(new WebRTCEventLogMsg_EnableEventLog(id, file_for_transit));
|
| -}
|
| -
|
| void RenderProcessHostImpl::SendDisableAecDumpToRenderer() {
|
| Send(new AecDumpMsg_DisableAecDump());
|
| }
|
|
|
| -void RenderProcessHostImpl::SendDisableEventLogToRenderer() {
|
| - Send(new WebRTCEventLogMsg_DisableEventLog());
|
| -}
|
| -
|
| base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions(
|
| const base::FilePath& file) {
|
| return file.AddExtension(IntToStringType(base::GetProcId(GetHandle())))
|
| .AddExtension(kAecDumpFileNameAddition);
|
| }
|
| -
|
| -base::FilePath RenderProcessHostImpl::GetEventLogFilePathWithExtensions(
|
| - const base::FilePath& file) {
|
| - return file.AddExtension(IntToStringType(base::GetProcId(GetHandle())))
|
| - .AddExtension(kEventLogFileNameAddition);
|
| -}
|
| #endif // defined(ENABLE_WEBRTC)
|
|
|
| void RenderProcessHostImpl::GetAudioOutputControllers(
|
|
|