diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 7be3aba227cc..65b019248914 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -1690,12 +1690,13 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName, const int32_t& aMountGeneration, const bool& aIsMediaPresent, const bool& aIsSharing, - const bool& aIsFormatting) + const bool& aIsFormatting, + const bool& aIsFake) { #ifdef MOZ_WIDGET_GONK nsRefPtr volume = new nsVolume(aFsName, aVolumeName, aState, aMountGeneration, aIsMediaPresent, - aIsSharing, aIsFormatting); + aIsSharing, aIsFormatting, aIsFake); nsRefPtr vs = nsVolumeService::GetSingleton(); if (vs) { @@ -1710,6 +1711,7 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName, unused << aIsMediaPresent; unused << aIsSharing; unused << aIsFormatting; + unused << aIsFake; #endif return true; } diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index f5d65b0739ef..12b3f533dd7f 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -256,7 +256,8 @@ public: const int32_t& aMountGeneration, const bool& aIsMediaPresent, const bool& aIsSharing, - const bool& aIsFormatting) MOZ_OVERRIDE; + const bool& aIsFormatting, + const bool& aIsFake) MOZ_OVERRIDE; virtual bool RecvNuwaFork() MOZ_OVERRIDE; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 7b037f488683..590570d6dbcd 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2237,6 +2237,7 @@ ContentParent::Observe(nsISupports* aSubject, bool isMediaPresent; bool isSharing; bool isFormatting; + bool isFake; vol->GetName(volName); vol->GetMountPoint(mountPoint); @@ -2245,10 +2246,11 @@ ContentParent::Observe(nsISupports* aSubject, vol->GetIsMediaPresent(&isMediaPresent); vol->GetIsSharing(&isSharing); vol->GetIsFormatting(&isFormatting); + vol->GetIsFake(&isFake); unused << SendFileSystemUpdate(volName, mountPoint, state, mountGeneration, isMediaPresent, - isSharing, isFormatting); + isSharing, isFormatting, isFake); } else if (!strcmp(aTopic, "phone-state-changed")) { nsString state(aData); unused << SendNotifyPhoneStateChange(state); diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 6a7477a4eaa5..a330d76372bf 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -388,7 +388,7 @@ child: FileSystemUpdate(nsString fsName, nsString mountPoint, int32_t fsState, int32_t mountGeneration, bool isMediaPresent, - bool isSharing, bool isFormatting); + bool isSharing, bool isFormatting, bool isFake); // Ask the Nuwa process to create a new child process. NuwaFork(); diff --git a/dom/system/gonk/nsVolume.h b/dom/system/gonk/nsVolume.h index 3b078eae7cd0..e583f8f697aa 100644 --- a/dom/system/gonk/nsVolume.h +++ b/dom/system/gonk/nsVolume.h @@ -30,13 +30,13 @@ public: nsVolume(const nsAString& aName, const nsAString& aMountPoint, const int32_t& aState, const int32_t& aMountGeneration, const bool& aIsMediaPresent, const bool& aIsSharing, - const bool& aIsFormatting) + const bool& aIsFormatting, const bool& aIsFake) : mName(aName), mMountPoint(aMountPoint), mState(aState), mMountGeneration(aMountGeneration), mMountLocked(false), - mIsFake(false), + mIsFake(aIsFake), mIsMediaPresent(aIsMediaPresent), mIsSharing(aIsSharing), mIsFormatting(aIsFormatting) @@ -82,7 +82,7 @@ public: typedef nsTArray > Array; private: - ~nsVolume() {} + virtual ~nsVolume() {} // MozExternalRefCountType complains if this is non-virtual friend class nsVolumeService; // Calls the following XxxMountLock functions void UpdateMountLock(const nsAString& aMountLockState); diff --git a/dom/system/gonk/nsVolumeService.cpp b/dom/system/gonk/nsVolumeService.cpp index 3ff86b842227..ef058cc388ba 100644 --- a/dom/system/gonk/nsVolumeService.cpp +++ b/dom/system/gonk/nsVolumeService.cpp @@ -249,7 +249,8 @@ nsVolumeService::CreateOrGetVolumeByPath(const nsAString& aPath, nsIVolume** aRe -1 /* generation */, true /* isMediaPresent*/, false /* isSharing */, - false /* isFormatting */); + false /* isFormatting */, + true /* isFake */); vol.forget(aResult); return NS_OK; } @@ -382,8 +383,8 @@ nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path) -1 /* mountGeneration */, true /* isMediaPresent */, false /* isSharing */, - false /* isFormatting */); - vol->SetIsFake(true); + false /* isFormatting */, + true /* isFake */); vol->LogState(); UpdateVolume(vol.get()); return NS_OK;