From cfa3d2a2b558edfa1c89b386dd253b728801d627 Mon Sep 17 00:00:00 2001 From: Dale Harvey Date: Wed, 23 Jan 2013 16:35:06 -0500 Subject: [PATCH] Bug 833095 - Fix format of file notification when recording complete. r=mikeh --- dom/camera/GonkCameraControl.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dom/camera/GonkCameraControl.cpp b/dom/camera/GonkCameraControl.cpp index 80c0293fa085..86b8df447828 100644 --- a/dom/camera/GonkCameraControl.cpp +++ b/dom/camera/GonkCameraControl.cpp @@ -904,9 +904,8 @@ nsGonkCameraControl::StartRecordingImpl(StartRecordingTask* aStartRecording) class RecordingComplete : public nsRunnable { public: - RecordingComplete(DeviceStorageFile* aFile, nsACString& aType) + RecordingComplete(DeviceStorageFile* aFile) : mFile(aFile) - , mType(aType) { } ~RecordingComplete() { } @@ -915,16 +914,13 @@ public: { MOZ_ASSERT(NS_IsMainThread()); - nsString data; - CopyASCIItoUTF16(mType, data); nsCOMPtr obs = mozilla::services::GetObserverService(); - obs->NotifyObservers(mFile, "file-watcher-notify", data.get()); + obs->NotifyObservers(mFile, "file-watcher-notify", NS_LITERAL_STRING("modified").get()); return NS_OK; } private: nsRefPtr mFile; - nsCString mType; }; nsresult @@ -937,8 +933,7 @@ nsGonkCameraControl::StopRecordingImpl(StopRecordingTask* aStopRecording) mRecorder = nullptr; // notify DeviceStorage that the new video file is closed and ready - nsCString type(mRecorderProfile->GetFileMimeType()); - nsCOMPtr recordingComplete = new RecordingComplete(mVideoFile, type); + nsCOMPtr recordingComplete = new RecordingComplete(mVideoFile); return NS_DispatchToMainThread(recordingComplete, NS_DISPATCH_NORMAL); }