Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: media/base/media_log.cc

Issue 2064083002: media: Add Rappor reporting in MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/media_log.h ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/base/media_log.h ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698