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

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

Issue 2712983004: Simplify/Cleanup MediaClient (Closed)
Patch Set: Little fixes Created 3 years, 8 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
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void MediaLog::AddEvent(std::unique_ptr<MediaLogEvent> event) {} 192 void MediaLog::AddEvent(std::unique_ptr<MediaLogEvent> event) {}
193 193
194 std::string MediaLog::GetLastErrorMessage() { 194 std::string MediaLog::GetLastErrorMessage() {
195 return ""; 195 return "";
196 } 196 }
197 197
198 void MediaLog::RecordRapporWithSecurityOrigin(const std::string& metric) { 198 void MediaLog::RecordRapporWithSecurityOrigin(const std::string& metric) {
199 DVLOG(1) << "Default MediaLog doesn't support rappor reporting."; 199 DVLOG(1) << "Default MediaLog doesn't support rappor reporting.";
200 } 200 }
201 201
202 void MediaLog::RecordRapporWithURL(const std::string& metric, const GURL& url) {
203 DVLOG(1) << "Default MediaLog doesn't support rappor reporting.";
204 }
205
202 std::unique_ptr<MediaLogEvent> MediaLog::CreateEvent(MediaLogEvent::Type type) { 206 std::unique_ptr<MediaLogEvent> MediaLog::CreateEvent(MediaLogEvent::Type type) {
203 std::unique_ptr<MediaLogEvent> event(new MediaLogEvent); 207 std::unique_ptr<MediaLogEvent> event(new MediaLogEvent);
204 event->id = id_; 208 event->id = id_;
205 event->type = type; 209 event->type = type;
206 event->time = base::TimeTicks::Now(); 210 event->time = base::TimeTicks::Now();
207 return event; 211 return event;
208 } 212 }
209 213
210 std::unique_ptr<MediaLogEvent> MediaLog::CreateBooleanEvent( 214 std::unique_ptr<MediaLogEvent> MediaLog::CreateBooleanEvent(
211 MediaLogEvent::Type type, 215 MediaLogEvent::Type type,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 const scoped_refptr<MediaLog>& media_log) 337 const scoped_refptr<MediaLog>& media_log)
334 : level_(level), media_log_(media_log) { 338 : level_(level), media_log_(media_log) {
335 DCHECK(media_log_.get()); 339 DCHECK(media_log_.get());
336 } 340 }
337 341
338 LogHelper::~LogHelper() { 342 LogHelper::~LogHelper() {
339 media_log_->AddLogEvent(level_, stream_.str()); 343 media_log_->AddLogEvent(level_, stream_.str());
340 } 344 }
341 345
342 } //namespace media 346 } //namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698