OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/media/render_media_log.h" | 5 #include "content/renderer/media/render_media_log.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Print an event to the chromium log. | 26 // Print an event to the chromium log. |
27 void Log(media::MediaLogEvent* event) { | 27 void Log(media::MediaLogEvent* event) { |
28 if (event->type == media::MediaLogEvent::PIPELINE_ERROR || | 28 if (event->type == media::MediaLogEvent::PIPELINE_ERROR || |
29 event->type == media::MediaLogEvent::MEDIA_ERROR_LOG_ENTRY) { | 29 event->type == media::MediaLogEvent::MEDIA_ERROR_LOG_ENTRY) { |
30 LOG(ERROR) << "MediaEvent: " | 30 LOG(ERROR) << "MediaEvent: " |
31 << media::MediaLog::MediaEventToLogString(*event); | 31 << media::MediaLog::MediaEventToLogString(*event); |
32 } else if (event->type != media::MediaLogEvent::BUFFERED_EXTENTS_CHANGED && | 32 } else if (event->type != media::MediaLogEvent::BUFFERED_EXTENTS_CHANGED && |
33 event->type != media::MediaLogEvent::PROPERTY_CHANGE && | 33 event->type != media::MediaLogEvent::PROPERTY_CHANGE && |
| 34 event->type != media::MediaLogEvent::WATCH_TIME_UPDATE && |
34 event->type != media::MediaLogEvent::NETWORK_ACTIVITY_SET) { | 35 event->type != media::MediaLogEvent::NETWORK_ACTIVITY_SET) { |
35 MEDIA_EVENT_LOG_UTILITY << "MediaEvent: " | 36 MEDIA_EVENT_LOG_UTILITY << "MediaEvent: " |
36 << media::MediaLog::MediaEventToLogString(*event); | 37 << media::MediaLog::MediaEventToLogString(*event); |
37 } | 38 } |
38 } | 39 } |
39 | 40 |
40 } // namespace | 41 } // namespace |
41 | 42 |
42 namespace content { | 43 namespace content { |
43 | 44 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 tick_clock_.swap(tick_clock); | 169 tick_clock_.swap(tick_clock); |
169 last_ipc_send_time_ = tick_clock_->NowTicks(); | 170 last_ipc_send_time_ = tick_clock_->NowTicks(); |
170 } | 171 } |
171 | 172 |
172 void RenderMediaLog::SetTaskRunnerForTesting( | 173 void RenderMediaLog::SetTaskRunnerForTesting( |
173 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { | 174 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { |
174 task_runner_ = task_runner; | 175 task_runner_ = task_runner; |
175 } | 176 } |
176 | 177 |
177 } // namespace content | 178 } // namespace content |
OLD | NEW |