Bug 1396629 - P2. Change string type. r?cpearce
MozReview-Commit-ID: Jl8t60Qh600
--- a/dom/media/MediaContainerType.h
+++ b/dom/media/MediaContainerType.h
@@ -32,17 +32,17 @@ public:
{
}
const MediaMIMEType& Type() const { return mExtendedMIMEType.Type(); }
const MediaExtendedMIMEType& ExtendedType() const { return mExtendedMIMEType; }
// Original string. Note that "type/subtype" may not be lowercase,
// use Type().AsString() instead to get the normalized "type/subtype".
- const nsACString& OriginalString() const { return mExtendedMIMEType.OriginalString(); }
+ const nsCString& OriginalString() const { return mExtendedMIMEType.OriginalString(); }
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
MediaExtendedMIMEType mExtendedMIMEType;
};
Maybe<MediaContainerType> MakeMediaContainerType(const nsAString& aType);
--- a/dom/media/MediaMIMETypes.h
+++ b/dom/media/MediaMIMETypes.h
@@ -51,17 +51,17 @@ public:
// Construction from a DependentMediaMIMEType, with its inherent checks.
// Implicit so MEDIAMIMETYPE can be used wherever a MediaMIMEType is expected.
MOZ_IMPLICIT MediaMIMEType(const DependentMediaMIMEType& aType)
: mMIMEType(aType.AsDependentString())
{
}
// MIME "type/subtype", always lowercase.
- const nsACString& AsString() const { return mMIMEType; }
+ const nsCString& AsString() const { return mMIMEType; }
// Comparison with DependentMediaMIMEType.
// Useful to compare to MEDIAMIMETYPE literals.
bool operator==(const DependentMediaMIMEType& aOther) const
{
return mMIMEType.Equals(aOther.AsDependentString());
}
bool operator!=(const DependentMediaMIMEType& aOther) const
@@ -113,17 +113,17 @@ public:
// Construction from a literal comma-separated list of codecs. Unchecked.
template <size_t N>
explicit MediaCodecs(const char (&aCodecs)[N])
: mCodecs(NS_ConvertUTF8toUTF16(aCodecs, N - 1))
{
}
bool IsEmpty() const { return mCodecs.IsEmpty(); }
- const nsAString& AsString() const { return mCodecs; }
+ const nsString& AsString() const { return mCodecs; }
using RangeType =
const StringListRange<nsString, StringListRangeEmptyItems::ProcessEmptyItems>;
// Produces a range object with begin()&end(), can be used in range-for loops.
// This will iterate through all codecs, even empty ones (except if the
// original list was an empty string). Iterators dereference to
// 'const nsDependentString', valid for as long as this MediaCodecs object.
@@ -175,17 +175,17 @@ public:
// Sizes and rates.
Maybe<int32_t> GetWidth() const { return GetMaybeNumber(mWidth); }
Maybe<int32_t> GetHeight() const { return GetMaybeNumber(mHeight); }
Maybe<int32_t> GetFramerate() const { return GetMaybeNumber(mFramerate); }
Maybe<int32_t> GetBitrate() const { return GetMaybeNumber(mBitrate); }
// Original string. Note that "type/subtype" may not be lowercase,
// use Type().AsString() instead to get the normalized "type/subtype".
- const nsACString& OriginalString() const { return mOriginalString; }
+ const nsCString& OriginalString() const { return mOriginalString; }
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
private:
friend Maybe<MediaExtendedMIMEType> MakeMediaExtendedMIMEType(const nsAString& aType);
MediaExtendedMIMEType(const nsACString& aOriginalString,
const nsACString& aMIMEType,
bool aHaveCodecs, const nsAString& aCodecs,