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 "media/base/media_log.h" | 5 #include "media/base/media_log.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return MediaLogEvent::MEDIA_INFO_LOG_ENTRY; | 65 return MediaLogEvent::MEDIA_INFO_LOG_ENTRY; |
66 case MEDIALOG_DEBUG: | 66 case MEDIALOG_DEBUG: |
67 return MediaLogEvent::MEDIA_DEBUG_LOG_ENTRY; | 67 return MediaLogEvent::MEDIA_DEBUG_LOG_ENTRY; |
68 } | 68 } |
69 NOTREACHED(); | 69 NOTREACHED(); |
70 return MediaLogEvent::MEDIA_ERROR_LOG_ENTRY; | 70 return MediaLogEvent::MEDIA_ERROR_LOG_ENTRY; |
71 } | 71 } |
72 | 72 |
73 std::string MediaLog::EventTypeToString(MediaLogEvent::Type type) { | 73 std::string MediaLog::EventTypeToString(MediaLogEvent::Type type) { |
74 switch (type) { | 74 switch (type) { |
| 75 case MediaLogEvent::MEDIALOG_CREATED: |
| 76 return "MEDIALOG_CREATED"; |
75 case MediaLogEvent::WEBMEDIAPLAYER_CREATED: | 77 case MediaLogEvent::WEBMEDIAPLAYER_CREATED: |
76 return "WEBMEDIAPLAYER_CREATED"; | 78 return "WEBMEDIAPLAYER_CREATED"; |
77 case MediaLogEvent::WEBMEDIAPLAYER_DESTROYED: | 79 case MediaLogEvent::WEBMEDIAPLAYER_DESTROYED: |
78 return "WEBMEDIAPLAYER_DESTROYED"; | 80 return "WEBMEDIAPLAYER_DESTROYED"; |
79 case MediaLogEvent::LOAD: | 81 case MediaLogEvent::LOAD: |
80 return "LOAD"; | 82 return "LOAD"; |
81 case MediaLogEvent::SEEK: | 83 case MediaLogEvent::SEEK: |
82 return "SEEK"; | 84 return "SEEK"; |
83 case MediaLogEvent::PLAY: | 85 case MediaLogEvent::PLAY: |
84 return "PLAY"; | 86 return "PLAY"; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 const scoped_refptr<MediaLog>& media_log) | 335 const scoped_refptr<MediaLog>& media_log) |
334 : level_(level), media_log_(media_log) { | 336 : level_(level), media_log_(media_log) { |
335 DCHECK(media_log_.get()); | 337 DCHECK(media_log_.get()); |
336 } | 338 } |
337 | 339 |
338 LogHelper::~LogHelper() { | 340 LogHelper::~LogHelper() { |
339 media_log_->AddLogEvent(level_, stream_.str()); | 341 media_log_->AddLogEvent(level_, stream_.str()); |
340 } | 342 } |
341 | 343 |
342 } //namespace media | 344 } //namespace media |
OLD | NEW |