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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return event.Pass(); | 145 return event.Pass(); |
146 } | 146 } |
147 | 147 |
148 scoped_ptr<MediaLogEvent> MediaLog::CreateBooleanEvent( | 148 scoped_ptr<MediaLogEvent> MediaLog::CreateBooleanEvent( |
149 MediaLogEvent::Type type, const char* property, bool value) { | 149 MediaLogEvent::Type type, const char* property, bool value) { |
150 scoped_ptr<MediaLogEvent> event(CreateEvent(type)); | 150 scoped_ptr<MediaLogEvent> event(CreateEvent(type)); |
151 event->params.SetBoolean(property, value); | 151 event->params.SetBoolean(property, value); |
152 return event.Pass(); | 152 return event.Pass(); |
153 } | 153 } |
154 | 154 |
155 scoped_ptr<MediaLogEvent> MediaLog::CreateIntegerEvent( | 155 scoped_ptr<MediaLogEvent> MediaLog::CreateStringEvent( |
156 MediaLogEvent::Type type, const char* property, int64 value) { | 156 MediaLogEvent::Type type, const char* property, const std::string& value) { |
157 scoped_ptr<MediaLogEvent> event(CreateEvent(type)); | 157 scoped_ptr<MediaLogEvent> event(CreateEvent(type)); |
158 event->params.SetInteger(property, value); | 158 event->params.SetString(property, value); |
159 return event.Pass(); | 159 return event.Pass(); |
160 } | 160 } |
161 | 161 |
162 scoped_ptr<MediaLogEvent> MediaLog::CreateTimeEvent( | 162 scoped_ptr<MediaLogEvent> MediaLog::CreateTimeEvent( |
163 MediaLogEvent::Type type, const char* property, base::TimeDelta value) { | 163 MediaLogEvent::Type type, const char* property, base::TimeDelta value) { |
164 scoped_ptr<MediaLogEvent> event(CreateEvent(type)); | 164 scoped_ptr<MediaLogEvent> event(CreateEvent(type)); |
165 event->params.SetDouble(property, value.InSecondsF()); | 165 event->params.SetDouble(property, value.InSecondsF()); |
166 return event.Pass(); | 166 return event.Pass(); |
167 } | 167 } |
168 | 168 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 size_t start, size_t current, size_t end) { | 205 size_t start, size_t current, size_t end) { |
206 scoped_ptr<MediaLogEvent> event( | 206 scoped_ptr<MediaLogEvent> event( |
207 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); | 207 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); |
208 event->params.SetInteger("buffer_start", start); | 208 event->params.SetInteger("buffer_start", start); |
209 event->params.SetInteger("buffer_current", current); | 209 event->params.SetInteger("buffer_current", current); |
210 event->params.SetInteger("buffer_end", end); | 210 event->params.SetInteger("buffer_end", end); |
211 return event.Pass(); | 211 return event.Pass(); |
212 } | 212 } |
213 | 213 |
214 } //namespace media | 214 } //namespace media |
OLD | NEW |