mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 14:30:43 +00:00
Bug 835612 - Fix nsVolumeService to use strings better, r=jlebar
This commit is contained in:
parent
6da4e7b9c8
commit
a2f2f91dda
@ -1165,7 +1165,7 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName,
|
||||
aMountGeneration);
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
nsString stateStr(NS_ConvertUTF8toUTF16(volume->StateStr()));
|
||||
NS_ConvertUTF8toUTF16 stateStr(volume->StateStr());
|
||||
obs->NotifyObservers(volume, NS_VOLUME_STATE_CHANGED, stateStr.get());
|
||||
#else
|
||||
// Remove warnings about unused arguments
|
||||
|
@ -130,7 +130,7 @@ NS_IMETHODIMP nsVolumeService::BroadcastVolume(const nsAString& aVolName)
|
||||
NS_ENSURE_TRUE(obs, NS_NOINTERFACE);
|
||||
|
||||
DBG("nsVolumeService::BroadcastVolume for '%s'", vol->NameStr().get());
|
||||
nsString stateStr(NS_ConvertUTF8toUTF16(vol->StateStr()));
|
||||
NS_ConvertUTF8toUTF16 stateStr(vol->StateStr());
|
||||
obs->NotifyObservers(vol, NS_VOLUME_STATE_CHANGED, stateStr.get());
|
||||
return NS_OK;
|
||||
}
|
||||
@ -269,7 +269,7 @@ void nsVolumeService::UpdateVolume(const nsVolume* aVolume)
|
||||
if (!obs) {
|
||||
return;
|
||||
}
|
||||
nsString stateStr(NS_ConvertUTF8toUTF16(vol->StateStr()));
|
||||
NS_ConvertUTF8toUTF16 stateStr(vol->StateStr());
|
||||
obs->NotifyObservers(vol, NS_VOLUME_STATE_CHANGED, stateStr.get());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user