| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 MediaLog::~MediaLog() {} | 168 MediaLog::~MediaLog() {} |
| 169 | 169 |
| 170 void MediaLog::AddEvent(std::unique_ptr<MediaLogEvent> event) {} | 170 void MediaLog::AddEvent(std::unique_ptr<MediaLogEvent> event) {} |
| 171 | 171 |
| 172 std::string MediaLog::GetLastErrorMessage() { | 172 std::string MediaLog::GetLastErrorMessage() { |
| 173 return ""; | 173 return ""; |
| 174 } | 174 } |
| 175 | 175 |
| 176 void MediaLog::RecordRapporWithSecurityOrigin(const std::string& metric) { | 176 void MediaLog::RecordRapporWithSecurityOrigin(const std::string& metric) { |
| 177 NOTIMPLEMENTED() << "Default MediaLog doesn't support rappor reporting."; | 177 DVLOG(1) << "Default MediaLog doesn't support rappor reporting."; |
| 178 } | 178 } |
| 179 | 179 |
| 180 std::unique_ptr<MediaLogEvent> MediaLog::CreateEvent(MediaLogEvent::Type type) { | 180 std::unique_ptr<MediaLogEvent> MediaLog::CreateEvent(MediaLogEvent::Type type) { |
| 181 std::unique_ptr<MediaLogEvent> event(new MediaLogEvent); | 181 std::unique_ptr<MediaLogEvent> event(new MediaLogEvent); |
| 182 event->id = id_; | 182 event->id = id_; |
| 183 event->type = type; | 183 event->type = type; |
| 184 event->time = base::TimeTicks::Now(); | 184 event->time = base::TimeTicks::Now(); |
| 185 return event; | 185 return event; |
| 186 } | 186 } |
| 187 | 187 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 const scoped_refptr<MediaLog>& media_log) | 304 const scoped_refptr<MediaLog>& media_log) |
| 305 : level_(level), media_log_(media_log) { | 305 : level_(level), media_log_(media_log) { |
| 306 DCHECK(media_log_.get()); | 306 DCHECK(media_log_.get()); |
| 307 } | 307 } |
| 308 | 308 |
| 309 LogHelper::~LogHelper() { | 309 LogHelper::~LogHelper() { |
| 310 media_log_->AddLogEvent(level_, stream_.str()); | 310 media_log_->AddLogEvent(level_, stream_.str()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 } //namespace media | 313 } //namespace media |
| OLD | NEW |