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

Unified Diff: media/base/media_log.h

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/filter_factories.h ('k') | media/base/media_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_log.h
diff --git a/media/base/media_log.h b/media/base/media_log.h
index 9f5e6680964617b3217189752f55b8d9873a6c29..b45b7416a6ebd9668a8dc436b151ff4dba9934f4 100644
--- a/media/base/media_log.h
+++ b/media/base/media_log.h
@@ -26,24 +26,25 @@ class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
// Add an event to this log. Overriden by inheritors to actually do something
// with it.
- // Takes ownership of |event|.
- virtual void AddEvent(MediaLogEvent* event);
+ virtual void AddEvent(scoped_ptr<MediaLogEvent> event);
// Helper methods to create events and their parameters.
- MediaLogEvent* CreateEvent(MediaLogEvent::Type type);
- MediaLogEvent* CreateBooleanEvent(MediaLogEvent::Type type,
- const char* property, bool value);
- MediaLogEvent* CreateIntegerEvent(MediaLogEvent::Type type,
- const char* property, int64 value);
- MediaLogEvent* CreateTimeEvent(MediaLogEvent::Type type,
- const char* property, base::TimeDelta value);
- MediaLogEvent* CreateLoadEvent(const std::string& url);
- MediaLogEvent* CreateSeekEvent(float seconds);
- MediaLogEvent* CreatePipelineStateChangedEvent(PipelineImpl::State state);
- MediaLogEvent* CreatePipelineErrorEvent(PipelineStatus error);
- MediaLogEvent* CreateVideoSizeSetEvent(size_t width, size_t height);
- MediaLogEvent* CreateBufferedExtentsChangedEvent(size_t start, size_t current,
- size_t end);
+ scoped_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type);
+ scoped_ptr<MediaLogEvent> CreateBooleanEvent(
+ MediaLogEvent::Type type, const char* property, bool value);
+ scoped_ptr<MediaLogEvent> CreateIntegerEvent(
+ MediaLogEvent::Type type, const char* property, int64 value);
+ scoped_ptr<MediaLogEvent> CreateTimeEvent(
+ MediaLogEvent::Type type, const char* property, base::TimeDelta value);
+ scoped_ptr<MediaLogEvent> CreateLoadEvent(const std::string& url);
+ scoped_ptr<MediaLogEvent> CreateSeekEvent(float seconds);
+ scoped_ptr<MediaLogEvent> CreatePipelineStateChangedEvent(
+ PipelineImpl::State state);
+ scoped_ptr<MediaLogEvent> CreatePipelineErrorEvent(PipelineStatus error);
+ scoped_ptr<MediaLogEvent> CreateVideoSizeSetEvent(
+ size_t width, size_t height);
+ scoped_ptr<MediaLogEvent> CreateBufferedExtentsChangedEvent(
+ size_t start, size_t current, size_t end);
// Called when the pipeline statistics have been updated.
// This gets called every frame, so we send the most recent stats after 500ms.
« no previous file with comments | « media/base/filter_factories.h ('k') | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698