| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_rtp_dump_handler.h" | 5 #include "chrome/browser/media/webrtc/webrtc_rtp_dump_handler.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/browser/media/webrtc_rtp_dump_writer.h" | 13 #include "chrome/browser/media/webrtc/webrtc_rtp_dump_writer.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 | 15 |
| 16 using content::BrowserThread; | 16 using content::BrowserThread; |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 static const size_t kMaxOngoingRtpDumpsAllowed = 5; | 20 static const size_t kMaxOngoingRtpDumpsAllowed = 5; |
| 21 | 21 |
| 22 // The browser process wide total number of ongoing (i.e. started and not | 22 // The browser process wide total number of ongoing (i.e. started and not |
| 23 // released) RTP dumps. Incoming and outgoing in one WebRtcDumpHandler are | 23 // released) RTP dumps. Incoming and outgoing in one WebRtcDumpHandler are |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 if (incoming_state_ != STATE_STOPPING && outgoing_state_ != STATE_STOPPING && | 336 if (incoming_state_ != STATE_STOPPING && outgoing_state_ != STATE_STOPPING && |
| 337 incoming_state_ != STATE_STARTED && outgoing_state_ != STATE_STARTED) { | 337 incoming_state_ != STATE_STARTED && outgoing_state_ != STATE_STARTED) { |
| 338 dump_writer_.reset(); | 338 dump_writer_.reset(); |
| 339 --g_ongoing_rtp_dumps; | 339 --g_ongoing_rtp_dumps; |
| 340 } | 340 } |
| 341 | 341 |
| 342 // This object might be deleted after running the callback. | 342 // This object might be deleted after running the callback. |
| 343 if (!callback.is_null()) | 343 if (!callback.is_null()) |
| 344 callback.Run(); | 344 callback.Run(); |
| 345 } | 345 } |
| OLD | NEW |