nsILocalStorageManager.idl (1347B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #include "nsISupports.idl" 8 9 interface nsIPrincipal; 10 11 /** 12 * Methods specific to LocalStorage, see nsIDOMStorageManager for methods shared 13 * with SessionStorage. Methods may migrate there as SessionStorage is 14 * overhauled. 15 */ 16 [scriptable, builtinclass, uuid(d4f534da-2744-4db3-8774-8b187c64ade9)] 17 interface nsILocalStorageManager : nsISupports 18 { 19 readonly attribute boolean nextGenLocalStorageEnabled; 20 21 /** 22 * Trigger preload of LocalStorage for the given principal. For use by 23 * ContentParent::AboutToLoadHttpDocumentForChild to maximize the 24 * amount of time we have to load the data off disk before the page might 25 * attempt to touch LocalStorage. 26 * 27 * This method will not create a QuotaManager-managed directory on disk if 28 * one does not already exist for the principal. 29 */ 30 [implicit_jscontext] 31 Promise preload(in nsIPrincipal aPrincipal); 32 33 [implicit_jscontext] 34 Promise isPreloaded(in nsIPrincipal aPrincipal); 35 36 [implicit_jscontext] 37 Promise getState(in nsIPrincipal aPrincipal); 38 };