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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 MediaLog::MediaLog() : id_(g_media_log_count.GetNext()) {} | 147 MediaLog::MediaLog() : id_(g_media_log_count.GetNext()) {} |
148 | 148 |
149 MediaLog::~MediaLog() {} | 149 MediaLog::~MediaLog() {} |
150 | 150 |
151 void MediaLog::AddEvent(std::unique_ptr<MediaLogEvent> event) {} | 151 void MediaLog::AddEvent(std::unique_ptr<MediaLogEvent> event) {} |
152 | 152 |
153 std::string MediaLog::GetLastErrorMessage() { | 153 std::string MediaLog::GetLastErrorMessage() { |
154 return ""; | 154 return ""; |
155 } | 155 } |
156 | 156 |
| 157 void MediaLog::RecordRapporWithSecurityOrigin(const std::string& metric) { |
| 158 NOTIMPLEMENTED() << "Default MediaLog doesn't support rappor reporting."; |
| 159 } |
| 160 |
157 std::unique_ptr<MediaLogEvent> MediaLog::CreateEvent(MediaLogEvent::Type type) { | 161 std::unique_ptr<MediaLogEvent> MediaLog::CreateEvent(MediaLogEvent::Type type) { |
158 std::unique_ptr<MediaLogEvent> event(new MediaLogEvent); | 162 std::unique_ptr<MediaLogEvent> event(new MediaLogEvent); |
159 event->id = id_; | 163 event->id = id_; |
160 event->type = type; | 164 event->type = type; |
161 event->time = base::TimeTicks::Now(); | 165 event->time = base::TimeTicks::Now(); |
162 return event; | 166 return event; |
163 } | 167 } |
164 | 168 |
165 std::unique_ptr<MediaLogEvent> MediaLog::CreateBooleanEvent( | 169 std::unique_ptr<MediaLogEvent> MediaLog::CreateBooleanEvent( |
166 MediaLogEvent::Type type, | 170 MediaLogEvent::Type type, |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 const scoped_refptr<MediaLog>& media_log) | 285 const scoped_refptr<MediaLog>& media_log) |
282 : level_(level), media_log_(media_log) { | 286 : level_(level), media_log_(media_log) { |
283 DCHECK(media_log_.get()); | 287 DCHECK(media_log_.get()); |
284 } | 288 } |
285 | 289 |
286 LogHelper::~LogHelper() { | 290 LogHelper::~LogHelper() { |
287 media_log_->AddLogEvent(level_, stream_.str()); | 291 media_log_->AddLogEvent(level_, stream_.str()); |
288 } | 292 } |
289 | 293 |
290 } //namespace media | 294 } //namespace media |
OLD | NEW |