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

Unified Diff: media/base/media_log.h

Issue 2660003003: Add MediaError.message (Closed)
Patch Set: Simplify to just 1 string with no newlines: [status plus first MEDIA_ERROR_LOG_ENTRY], if any 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 side-by-side diff with in-line comments
Download patch
Index: media/base/media_log.h
diff --git a/media/base/media_log.h b/media/base/media_log.h
index cb0a6b622aabebf1853f7c26e5cf42f9352808fd..23d69e84477dc87f24c767e95b95d3549feef330 100644
--- a/media/base/media_log.h
+++ b/media/base/media_log.h
@@ -42,14 +42,18 @@ class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
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();
+ virtual std::string GetErrorMessage();
// Records the domain and registry of the current frame security origin to a
// Rappor privacy-preserving metric. See:

Powered by Google App Engine
This is Rietveld 408576698