Bug 1343442 - Move NotificationAndReportStringId closer to first use - r?jya
MozReview-Commit-ID: IBn5jsHTsKx
--- a/dom/media/DecoderDoctorDiagnostics.cpp
+++ b/dom/media/DecoderDoctorDiagnostics.cpp
@@ -27,24 +27,16 @@
static mozilla::LazyLogModule sDecoderDoctorLog("DecoderDoctor");
#define DD_LOG(level, arg, ...) MOZ_LOG(sDecoderDoctorLog, level, (arg, ##__VA_ARGS__))
#define DD_DEBUG(arg, ...) DD_LOG(mozilla::LogLevel::Debug, arg, ##__VA_ARGS__)
#define DD_INFO(arg, ...) DD_LOG(mozilla::LogLevel::Info, arg, ##__VA_ARGS__)
#define DD_WARN(arg, ...) DD_LOG(mozilla::LogLevel::Warning, arg, ##__VA_ARGS__)
namespace mozilla {
-struct NotificationAndReportStringId
-{
- // Notification type, handled by browser-media.js.
- dom::DecoderDoctorNotificationType mNotificationType;
- // Console message id. Key in dom/locales/.../chrome/dom/dom.properties.
- const char* mReportStringId;
-};
-
// Class that collects a sequence of diagnostics from the same document over a
// small period of time, in order to provide a synthesized analysis.
//
// Referenced by the document through a nsINode property, mTimer, and
// inter-task captures.
// When notified that the document is dead, or when the timer expires but
// nothing new happened, StopWatching() will remove the document property and
// timer (if present), so no more work will happen and the watcher will be
@@ -242,16 +234,24 @@ DecoderDoctorDocumentWatcher::EnsureTime
if (NS_WARN_IF(NS_FAILED(
mTimer->InitWithCallback(
this, sAnalysisPeriod_ms, nsITimer::TYPE_ONE_SHOT)))) {
mTimer = nullptr;
}
}
}
+struct NotificationAndReportStringId
+{
+ // Notification type, handled by browser-media.js.
+ dom::DecoderDoctorNotificationType mNotificationType;
+ // Console message id. Key in dom/locales/.../chrome/dom/dom.properties.
+ const char* mReportStringId;
+};
+
// Note: ReportStringIds are limited to alphanumeric only.
static const NotificationAndReportStringId sMediaWidevineNoWMF=
{ dom::DecoderDoctorNotificationType::Platform_decoder_not_found,
"MediaWidevineNoWMF" };
static const NotificationAndReportStringId sMediaWMFNeeded =
{ dom::DecoderDoctorNotificationType::Platform_decoder_not_found,
"MediaWMFNeeded" };
static const NotificationAndReportStringId sMediaPlatformDecoderNotFound =