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

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

Issue 7584033: Fix memory leak in MediaLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_ptr.h"
9 10
10 namespace media { 11 namespace media {
11 12
12 // A count of all MediaLogs created on this render process. 13 // A count of all MediaLogs created on this render process.
13 // Used to generate unique ids. 14 // Used to generate unique ids.
14 static base::AtomicSequenceNumber media_log_count(base::LINKER_INITIALIZED); 15 static base::AtomicSequenceNumber media_log_count(base::LINKER_INITIALIZED);
15 16
16 const char* MediaLog::EventTypeToString(MediaLogEvent::Type type) { 17 const char* MediaLog::EventTypeToString(MediaLogEvent::Type type) {
17 switch (type) { 18 switch (type) {
18 case MediaLogEvent::CREATING: 19 case MediaLogEvent::CREATING:
(...skipping 29 matching lines...) Expand all
48 } 49 }
49 50
50 MediaLogEvent* MediaLog::CreateEvent(MediaLogEvent::Type type) { 51 MediaLogEvent* MediaLog::CreateEvent(MediaLogEvent::Type type) {
51 MediaLogEvent* event = new MediaLogEvent; 52 MediaLogEvent* event = new MediaLogEvent;
52 event->id = id_; 53 event->id = id_;
53 event->type = type; 54 event->type = type;
54 event->time = base::Time::Now(); 55 event->time = base::Time::Now();
55 return event; 56 return event;
56 } 57 }
57 58
58 void MediaLog::AddEvent(MediaLogEvent* event) {} 59 void MediaLog::AddEvent(MediaLogEvent* event) {
60 scoped_ptr<MediaLogEvent> e(event);
61 }
59 62
60 } //namespace media 63 } //namespace media
OLDNEW
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698