summaryrefslogtreecommitdiffstats
path: root/media/cast/cast_environment.cc
diff options
context:
space:
mode:
authormiu <miu@chromium.org>2015-11-03 11:58:04 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-03 19:58:37 +0000
commit00b4e5f928016ad89286843b3b92c2dec35c78ac (patch)
tree634d780c3dd5509573a53f6974b75f464be31bec /media/cast/cast_environment.cc
parent000d05653a229d733c419492b2a188f37f5d1454 (diff)
downloadchromium_src-00b4e5f928016ad89286843b3b92c2dec35c78ac.zip
chromium_src-00b4e5f928016ad89286843b3b92c2dec35c78ac.tar.gz
chromium_src-00b4e5f928016ad89286843b3b92c2dec35c78ac.tar.bz2
[Cast] Thread-safe LogEventDispatcher for packet/frame event logging.
Removed LoggingImpl and LoggingRaw, and replaced with a thread-safe LogEventDispatcher. Interface changes were made to allow passing logging event data without extra copying. BUG=530841 Review URL: https://codereview.chromium.org/1418583003 Cr-Commit-Position: refs/heads/master@{#357590}
Diffstat (limited to 'media/cast/cast_environment.cc')
-rw-r--r--media/cast/cast_environment.cc20
1 files changed, 2 insertions, 18 deletions
diff --git a/media/cast/cast_environment.cc b/media/cast/cast_environment.cc
index f22f0a4..e3def4f 100644
--- a/media/cast/cast_environment.cc
+++ b/media/cast/cast_environment.cc
@@ -10,14 +10,6 @@
using base::SingleThreadTaskRunner;
-namespace {
-
-void DeleteLoggingOnMainThread(scoped_ptr<media::cast::LoggingImpl> logging) {
- logging.reset();
-}
-
-} // namespace
-
namespace media {
namespace cast {
@@ -30,17 +22,9 @@ CastEnvironment::CastEnvironment(
audio_thread_proxy_(audio_thread_proxy),
video_thread_proxy_(video_thread_proxy),
clock_(clock.Pass()),
- logging_(new LoggingImpl) {}
+ logger_(this) {}
-CastEnvironment::~CastEnvironment() {
- // Logging must be deleted on the main thread.
- if (main_thread_proxy_.get() &&
- !main_thread_proxy_->RunsTasksOnCurrentThread()) {
- main_thread_proxy_->PostTask(
- FROM_HERE,
- base::Bind(&DeleteLoggingOnMainThread, base::Passed(&logging_)));
- }
-}
+CastEnvironment::~CastEnvironment() {}
bool CastEnvironment::PostTask(ThreadId identifier,
const tracked_objects::Location& from_here,