Bug 869836 - Part 9a: Use AssignLiteral(MOZ_UTF16(...)) instead of Assign(NS_LITERAL_STRING(...)). r=ehsan

Relading with correct bug number so DONTBUILD.

--HG--
extra : amend_source : 6e05de7729c27761564124212b7d4cbe3318e482
This commit is contained in:
Neil Rashbrook 2014-05-26 21:54:10 +03:00
parent 740e2ee668
commit 0b70d2a086
16 changed files with 36 additions and 36 deletions

View File

@ -2970,7 +2970,7 @@ nsIDocument::GetLastModified(nsAString& aLastModified) const
} else {
// If we for whatever reason failed to find the last modified time
// (or even the current time), fall back to what NS4.x returned.
aLastModified.AssignLiteral("01/01/1970 00:00:00");
aLastModified.AssignLiteral(MOZ_UTF16("01/01/1970 00:00:00"));
}
}
@ -9173,16 +9173,16 @@ nsIDocument::GetReadyState(nsAString& aReadyState) const
{
switch(mReadyState) {
case READYSTATE_LOADING :
aReadyState.AssignLiteral("loading");
aReadyState.AssignLiteral(MOZ_UTF16("loading"));
break;
case READYSTATE_INTERACTIVE :
aReadyState.AssignLiteral("interactive");
aReadyState.AssignLiteral(MOZ_UTF16("interactive"));
break;
case READYSTATE_COMPLETE :
aReadyState.AssignLiteral("complete");
aReadyState.AssignLiteral(MOZ_UTF16("complete"));
break;
default:
aReadyState.AssignLiteral("uninitialized");
aReadyState.AssignLiteral(MOZ_UTF16("uninitialized"));
}
}

View File

@ -157,9 +157,9 @@ nsHTMLContentSerializer::SerializeHTMLAttributes(nsIContent* aContent,
nsDependentAtomString nameStr(attrName);
nsAutoString prefix;
if (namespaceID == kNameSpaceID_XML) {
prefix.AssignLiteral("xml");
prefix.AssignLiteral(MOZ_UTF16("xml"));
} else if (namespaceID == kNameSpaceID_XLink) {
prefix.AssignLiteral("xlink");
prefix.AssignLiteral(MOZ_UTF16("xlink"));
}
// Expand shorthand attribute.

View File

@ -51,14 +51,14 @@ MediaEngineDefaultVideoSource::~MediaEngineDefaultVideoSource()
void
MediaEngineDefaultVideoSource::GetName(nsAString& aName)
{
aName.AssignLiteral("Default Video Device");
aName.AssignLiteral(MOZ_UTF16("Default Video Device"));
return;
}
void
MediaEngineDefaultVideoSource::GetUUID(nsAString& aUUID)
{
aUUID.AssignLiteral("1041FCBD-3F12-4F7B-9E9B-1EC556DD5676");
aUUID.AssignLiteral(MOZ_UTF16("1041FCBD-3F12-4F7B-9E9B-1EC556DD5676"));
return;
}
@ -362,14 +362,14 @@ MediaEngineDefaultAudioSource::~MediaEngineDefaultAudioSource()
void
MediaEngineDefaultAudioSource::GetName(nsAString& aName)
{
aName.AssignLiteral("Default Audio Device");
aName.AssignLiteral(MOZ_UTF16("Default Audio Device"));
return;
}
void
MediaEngineDefaultAudioSource::GetUUID(nsAString& aUUID)
{
aUUID.AssignLiteral("B7CBD7C1-53EF-42F9-8353-73F61C70C092");
aUUID.AssignLiteral(MOZ_UTF16("B7CBD7C1-53EF-42F9-8353-73F61C70C092"));
return;
}

View File

@ -109,13 +109,13 @@ MediaEngineTabVideoSource::InitRunnable::Run()
void
MediaEngineTabVideoSource::GetName(nsAString_internal& aName)
{
aName.AssignLiteral("&getUserMedia.videoDevice.tabShare;");
aName.AssignLiteral(MOZ_UTF16("&getUserMedia.videoDevice.tabShare;"));
}
void
MediaEngineTabVideoSource::GetUUID(nsAString_internal& aUuid)
{
aUuid.AssignLiteral("uuid");
aUuid.AssignLiteral(MOZ_UTF16("uuid"));
}
nsresult

View File

@ -4612,7 +4612,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
// If the page doesn't have a title, we will use a blank space which will be trimmed
// and thus treated as empty by the front-end.
if (messageStr.IsEmpty()) {
messageStr.Assign(' ');
messageStr.AssignLiteral(MOZ_UTF16(" "));
}
}
else {

View File

@ -331,14 +331,14 @@ MediaDevice::GetType(nsAString& aType)
NS_IMETHODIMP
VideoDevice::GetType(nsAString& aType)
{
aType.AssignLiteral("video");
aType.AssignLiteral(MOZ_UTF16("video"));
return NS_OK;
}
NS_IMETHODIMP
AudioDevice::GetType(nsAString& aType)
{
aType.AssignLiteral("audio");
aType.AssignLiteral(MOZ_UTF16("audio"));
return NS_OK;
}
@ -1834,7 +1834,7 @@ MediaManager::Observe(nsISupports* aSubject, const char* aTopic,
MOZ_ASSERT(msg);
msg->GetData(errorMessage);
if (errorMessage.IsEmpty())
errorMessage.AssignLiteral("UNKNOWN_ERROR");
errorMessage.AssignLiteral(MOZ_UTF16("UNKNOWN_ERROR"));
}
nsString key(aData);

View File

@ -786,7 +786,7 @@ nsresult gfxFontUtils::MakeUniqueUserFontName(nsAString& aName)
*p = '-';
}
aName.AssignLiteral("uf");
aName.AssignLiteral(MOZ_UTF16("uf"));
aName.AppendASCII(guidB64);
return NS_OK;
}

View File

@ -1133,7 +1133,7 @@ gfxWindowsPlatform::GetDLLVersion(char16ptr_t aDLLPath, nsAString& aVersion)
{
DWORD versInfoSize, vers[4] = {0};
// version info not available case
aVersion.AssignLiteral("0.0.0.0");
aVersion.AssignLiteral(MOZ_UTF16("0.0.0.0"));
versInfoSize = GetFileVersionInfoSizeW(aDLLPath, nullptr);
nsAutoTArray<BYTE,512> versionInfo;

View File

@ -325,7 +325,7 @@ nsIconChannel::InitWithGnome(nsIMozIconURI *aIconURI)
getter_Copies(appName));
} else {
NS_WARNING("brand.properties not present, using default application name");
appName.AssignLiteral("Gecko");
appName.AssignLiteral(MOZ_UTF16("Gecko"));
}
char* empty[] = { "" };

View File

@ -8938,13 +8938,13 @@ LogVerifyMessage(nsIFrame* k1, nsIFrame* k2, const char* aMsg)
if (k1) {
k1->GetFrameName(n1);
} else {
n1.AssignLiteral("(null)");
n1.AssignLiteral(MOZ_UTF16("(null)"));
}
if (k2) {
k2->GetFrameName(n2);
} else {
n2.AssignLiteral("(null)");
n2.AssignLiteral(MOZ_UTF16("(null)"));
}
printf("verifyreflow: %s %p != %s %p %s\n",

View File

@ -113,7 +113,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText)
// 'about:invalid' as the default value for url attributes,
// so let's also use it here as the default computed value
// for invalid URLs.
tmpStr.AssignLiteral("url(about:invalid)");
tmpStr.AssignLiteral(MOZ_UTF16("url(about:invalid)"));
}
break;
}

View File

@ -191,7 +191,7 @@ ConnectionData::Notify(nsITimer *aTimer)
mTimer = nullptr;
mStatus.AssignLiteral("NS_ERROR_NET_TIMEOUT");
mStatus.AssignLiteral(MOZ_UTF16("NS_ERROR_NET_TIMEOUT"));
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethodWithArg<nsRefPtr<ConnectionData> >
(mDashboard, &Dashboard::GetConnectionStatus, this);
@ -754,19 +754,19 @@ HttpConnInfo::SetHTTP1ProtocolVersion(uint8_t pv)
{
switch (pv) {
case NS_HTTP_VERSION_0_9:
protocolVersion.AssignLiteral("http/0.9");
protocolVersion.AssignLiteral(MOZ_UTF16("http/0.9"));
break;
case NS_HTTP_VERSION_1_0:
protocolVersion.AssignLiteral("http/1.0");
protocolVersion.AssignLiteral(MOZ_UTF16("http/1.0"));
break;
case NS_HTTP_VERSION_1_1:
protocolVersion.AssignLiteral("http/1.1");
protocolVersion.AssignLiteral(MOZ_UTF16("http/1.1"));
break;
case NS_HTTP_VERSION_2_0:
protocolVersion.AssignLiteral("http/2.0");
protocolVersion.AssignLiteral(MOZ_UTF16("http/2.0"));
break;
default:
protocolVersion.AssignLiteral("unknown protocol version");
protocolVersion.AssignLiteral(MOZ_UTF16("unknown protocol version"));
}
}
@ -774,9 +774,9 @@ void
HttpConnInfo::SetHTTP2ProtocolVersion(uint8_t pv)
{
if (pv == SPDY_VERSION_3) {
protocolVersion.AssignLiteral("spdy/3");
protocolVersion.AssignLiteral(MOZ_UTF16("spdy/3"));
} else if (pv == SPDY_VERSION_31) {
protocolVersion.AssignLiteral("spdy/3.1");
protocolVersion.AssignLiteral(MOZ_UTF16("spdy/3.1"));
} else {
MOZ_ASSERT (pv == NS_HTTP2_DRAFT_VERSION);
protocolVersion.Assign(NS_LITERAL_STRING(NS_HTTP2_DRAFT_TOKEN));

View File

@ -382,7 +382,7 @@ NS_IMPL_ISUPPORTS(nsMIMEInfoAndroid::SystemChooser, nsIHandlerApp)
nsresult nsMIMEInfoAndroid::SystemChooser::GetName(nsAString & aName) {
aName.AssignLiteral("Android chooser");
aName.AssignLiteral(MOZ_UTF16("Android chooser"));
return NS_OK;
}
@ -393,7 +393,7 @@ nsMIMEInfoAndroid::SystemChooser::SetName(const nsAString&) {
nsresult
nsMIMEInfoAndroid::SystemChooser::GetDetailedDescription(nsAString & aDesc) {
aDesc.AssignLiteral("Android's default handler application chooser");
aDesc.AssignLiteral(MOZ_UTF16("Android's default handler application chooser"));
return NS_OK;
}

View File

@ -3289,7 +3289,7 @@ GetBrandName(nsXPIDLString& brandName)
getter_Copies(brandName));
if (brandName.IsEmpty())
brandName.AssignLiteral("Mozilla");
brandName.AssignLiteral(MOZ_UTF16("Mozilla"));
}
static GdkWindow *

View File

@ -1971,7 +1971,7 @@ GetBrandName(nsXPIDLString& brandName)
}
if (brandName.IsEmpty()) {
brandName.AssignLiteral("Mozilla");
brandName.AssignLiteral(MOZ_UTF16("Mozilla"));
}
}

View File

@ -238,7 +238,7 @@ private:
// "what do you want to do" dialog
if (r == SE_ERR_NOASSOC) {
nsAutoString shellArg;
shellArg.AssignLiteral("shell32.dll,OpenAs_RunDLL ");
shellArg.AssignLiteral(MOZ_UTF16("shell32.dll,OpenAs_RunDLL "));
shellArg.Append(mResolvedPath);
seinfo.lpFile = L"RUNDLL32.EXE";
seinfo.lpParameters = shellArg.get();