| Index: media/base/media_log.h
|
| diff --git a/media/base/media_log.h b/media/base/media_log.h
|
| index cb0a6b622aabebf1853f7c26e5cf42f9352808fd..621f721149e9c2af4d98ba4070e10baeabf12eea 100644
|
| --- a/media/base/media_log.h
|
| +++ b/media/base/media_log.h
|
| @@ -37,19 +37,33 @@ class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
|
| static std::string MediaLogLevelToString(MediaLogLevel level);
|
| static MediaLogEvent::Type MediaLogLevelToEventType(MediaLogLevel level);
|
| static std::string EventTypeToString(MediaLogEvent::Type type);
|
| +
|
| + // Returns a string version of the status, unique to each PipelineStatus, and
|
| + // not including any ':'. This makes it suitable for usage in
|
| + // MediaError.message as the UA-specific-error-code.
|
| static std::string PipelineStatusToString(PipelineStatus status);
|
| +
|
| static std::string BufferingStateToString(BufferingState state);
|
|
|
| static std::string MediaEventToLogString(const MediaLogEvent& event);
|
|
|
| + // Returns a string usable as part of a MediaError.message, for only
|
| + // PIPELINE_ERROR or MEDIA_ERROR_LOG_ENTRY events, with any newlines replaced
|
| + // with whitespace in the latter kind of events.
|
| + static std::string MediaEventToMessageString(const MediaLogEvent& event);
|
| +
|
| MediaLog();
|
|
|
| // Add an event to this log. Overriden by inheritors to actually do something
|
| // with it.
|
| virtual void AddEvent(std::unique_ptr<MediaLogEvent> event);
|
|
|
| - // Retrieve an error message, if any.
|
| - virtual std::string GetLastErrorMessage();
|
| + // Returns a string usable as the contents of a MediaError.message.
|
| + // This method returns an incomplete message if it is called before the
|
| + // pertinent events for the error have been added to the log.
|
| + // Note: The base class definition only produces empty messages. See
|
| + // RenderMediaLog for where this method is meaningful.
|
| + virtual std::string GetErrorMessage();
|
|
|
| // Records the domain and registry of the current frame security origin to a
|
| // Rappor privacy-preserving metric. See:
|
|
|