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

Unified Diff: media/base/media_log.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/media_keys.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 6ab18597eac7c45d010b261dd2e9125f2d733764..d08e5426ad6ae5912cb98de6d329a40f76902640 100644
--- a/media/base/media_log.h
+++ b/media/base/media_log.h
@@ -8,13 +8,13 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <sstream>
#include <string>
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "media/base/media_export.h"
#include "media/base/media_log_event.h"
#include "media/base/pipeline_impl.h"
@@ -42,31 +42,33 @@ class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
// Add an event to this log. Overriden by inheritors to actually do something
// with it.
- virtual void AddEvent(scoped_ptr<MediaLogEvent> event);
+ virtual void AddEvent(std::unique_ptr<MediaLogEvent> event);
// Retrieve an error message, if any.
virtual std::string GetLastErrorMessage();
// Helper methods to create events and their parameters.
- scoped_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type);
- scoped_ptr<MediaLogEvent> CreateBooleanEvent(
- MediaLogEvent::Type type, const std::string& property, bool value);
- scoped_ptr<MediaLogEvent> CreateStringEvent(MediaLogEvent::Type type,
- const std::string& property,
- const std::string& value);
- scoped_ptr<MediaLogEvent> CreateTimeEvent(MediaLogEvent::Type type,
- const std::string& property,
- base::TimeDelta value);
- scoped_ptr<MediaLogEvent> CreateLoadEvent(const std::string& url);
- scoped_ptr<MediaLogEvent> CreateSeekEvent(float seconds);
- scoped_ptr<MediaLogEvent> CreatePipelineStateChangedEvent(
+ std::unique_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type);
+ std::unique_ptr<MediaLogEvent> CreateBooleanEvent(MediaLogEvent::Type type,
+ const std::string& property,
+ bool value);
+ std::unique_ptr<MediaLogEvent> CreateStringEvent(MediaLogEvent::Type type,
+ const std::string& property,
+ const std::string& value);
+ std::unique_ptr<MediaLogEvent> CreateTimeEvent(MediaLogEvent::Type type,
+ const std::string& property,
+ base::TimeDelta value);
+ std::unique_ptr<MediaLogEvent> CreateLoadEvent(const std::string& url);
+ std::unique_ptr<MediaLogEvent> CreateSeekEvent(float seconds);
+ std::unique_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(int64_t start,
- int64_t current,
- int64_t end);
+ std::unique_ptr<MediaLogEvent> CreatePipelineErrorEvent(PipelineStatus error);
+ std::unique_ptr<MediaLogEvent> CreateVideoSizeSetEvent(size_t width,
+ size_t height);
+ std::unique_ptr<MediaLogEvent> CreateBufferedExtentsChangedEvent(
+ int64_t start,
+ int64_t current,
+ int64_t end);
// Report a log message at the specified log level.
void AddLogEvent(MediaLogLevel level, const std::string& message);
« no previous file with comments | « media/base/media_keys.h ('k') | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698