gecko-dev/dom/quota/PQuota.ipdl
Jan Varga b968ceb813 Bug 1286798 - Part 18: Verify that data is persisted on disk; r=asuth,mrbkap
New methods open() and close() are added to the Storage WebIDL interface. They are only available when a pref is set and are only intended for testing. There's also a new method resetStoragesForPrincipal() which is used as a callback for close() since datastores don't release directory locks immediately. resetStoragesForPrincipal() requests an exclusive lock for given origin, so it must wait for any exising shared locks to be released.
2018-11-29 21:48:11 +01:00

133 lines
2.1 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PQuotaRequest;
include protocol PQuotaUsageRequest;
include PBackgroundSharedTypes;
include "mozilla/dom/quota/SerializationHelpers.h";
using mozilla::dom::quota::PersistenceType
from "mozilla/dom/quota/PersistenceType.h";
using mozilla::dom::quota::Client::Type
from "mozilla/dom/quota/Client.h";
namespace mozilla {
namespace dom {
namespace quota {
struct InitParams
{
};
struct InitTemporaryStorageParams
{
};
struct InitOriginParams
{
PrincipalInfo principalInfo;
PersistenceType persistenceType;
};
struct AllUsageParams
{
bool getAll;
};
struct OriginUsageParams
{
PrincipalInfo principalInfo;
bool getGroupUsage;
};
union UsageRequestParams
{
AllUsageParams;
OriginUsageParams;
};
struct ClearResetOriginParams
{
PrincipalInfo principalInfo;
PersistenceType persistenceType;
bool persistenceTypeIsExplicit;
Type clientType;
bool clientTypeIsExplicit;
bool matchAll;
};
struct ClearOriginParams
{
ClearResetOriginParams commonParams;
};
struct ResetOriginParams
{
ClearResetOriginParams commonParams;
};
struct ClearDataParams
{
nsString pattern;
};
struct ClearAllParams
{
};
struct ResetAllParams
{
};
struct PersistedParams
{
PrincipalInfo principalInfo;
};
struct PersistParams
{
PrincipalInfo principalInfo;
};
union RequestParams
{
InitParams;
InitTemporaryStorageParams;
InitOriginParams;
ClearOriginParams;
ResetOriginParams;
ClearDataParams;
ClearAllParams;
ResetAllParams;
PersistedParams;
PersistParams;
};
protocol PQuota
{
manager PBackground;
manages PQuotaRequest;
manages PQuotaUsageRequest;
parent:
async __delete__();
async PQuotaUsageRequest(UsageRequestParams params);
async PQuotaRequest(RequestParams params);
async StartIdleMaintenance();
async StopIdleMaintenance();
};
} // namespace quota
} // namespace dom
} // namespace mozilla