Chromium Code Reviews| Index: content/renderer/media/peer_connection_tracker.cc |
| diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc |
| index 60f3d26b18cd8e4751d9141b7ff23dedcbb1ef4e..a65b2aeff4b8b4a881a69d82fe88d14ef9f6bff7 100644 |
| --- a/content/renderer/media/peer_connection_tracker.cc |
| +++ b/content/renderer/media/peer_connection_tracker.cc |
| @@ -343,6 +343,8 @@ bool PeerConnectionTracker::OnControlMessageReceived( |
| IPC_BEGIN_MESSAGE_MAP(PeerConnectionTracker, message) |
| IPC_MESSAGE_HANDLER(PeerConnectionTracker_GetAllStats, OnGetAllStats) |
| IPC_MESSAGE_HANDLER(PeerConnectionTracker_OnSuspend, OnSuspend) |
| + IPC_MESSAGE_HANDLER(PeerConnectionTracker_StartEventLog, OnStartEventLog) |
| + IPC_MESSAGE_HANDLER(PeerConnectionTracker_StopEventLog, OnStopEventLog) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| return handled; |
| @@ -380,6 +382,32 @@ void PeerConnectionTracker::OnSuspend() { |
| } |
| } |
| +void PeerConnectionTracker::OnStartEventLog(int peer_connection_id, |
| + IPC::PlatformFileForTransit file) { |
| + DCHECK(main_thread_.CalledOnValidThread()); |
| + for (auto& it : peer_connection_id_map_) { |
| + if (it.second == peer_connection_id) { |
| +#if defined(OS_ANDROID) |
|
tommi (sloooow) - chröme
2016/05/25 15:16:21
add a comment for why we use different values
Ivo-OOO until feb 6
2016/05/30 15:04:15
Done.
|
| + const int64_t max_filesize_bytes = 10000000; |
|
dcheng
2016/05/26 22:05:15
Nit: kMaxFilesizeBytes
Ivo-OOO until feb 6
2016/05/30 15:04:15
Done.
|
| +#else |
| + const int64_t max_filesize_bytes = 30000000; |
| +#endif |
| + it.first->StartEventLog(file, max_filesize_bytes); |
| + return; |
| + } |
| + } |
| +} |
| + |
| +void PeerConnectionTracker::OnStopEventLog(int peer_connection_id) { |
| + DCHECK(main_thread_.CalledOnValidThread()); |
| + for (auto& it : peer_connection_id_map_) { |
| + if (it.second == peer_connection_id) { |
| + it.first->StopEventLog(); |
| + return; |
| + } |
| + } |
| +} |
| + |
| void PeerConnectionTracker::RegisterPeerConnection( |
| RTCPeerConnectionHandler* pc_handler, |
| const webrtc::PeerConnectionInterface::RTCConfiguration& config, |