mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #1263 - Part 1: Remove DiskSpaceWatcher
This commit is contained in:
parent
fe92ae641a
commit
92b01bf08a
20 changed files with 3 additions and 537 deletions
|
|
@ -11,7 +11,6 @@
|
|||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsIDiskSpaceWatcher.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
@ -321,22 +320,6 @@ private:
|
|||
mozilla::Unused << mParent->SendOriginsHavingData(scopes);
|
||||
}
|
||||
|
||||
// We need to check if the device is in a low disk space situation, so
|
||||
// we can forbid in that case any write in localStorage.
|
||||
nsCOMPtr<nsIDiskSpaceWatcher> diskSpaceWatcher =
|
||||
do_GetService("@mozilla.org/toolkit/disk-space-watcher;1");
|
||||
if (!diskSpaceWatcher) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool lowDiskSpace = false;
|
||||
diskSpaceWatcher->GetIsDiskFull(&lowDiskSpace);
|
||||
|
||||
if (lowDiskSpace) {
|
||||
mozilla::Unused << mParent->SendObserve(
|
||||
nsDependentCString("low-disk-space"), EmptyString(), EmptyCString());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue