tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PCookieStore.ipdl (3147B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2  * License, v. 2.0. If a copy of the MPL was not distributed with this
      3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 include protocol PBackground;
      6 include PBackgroundSharedTypes;
      7 include NeckoChannelParams;
      8 
      9 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
     10 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
     11 using struct nsID from "nsID.h";
     12 [RefCounted] using class nsIURI from "mozilla/ipc/URIUtils.h";
     13 
     14 namespace mozilla {
     15 namespace dom {
     16 
     17 union MaybeCookieStruct
     18 {
     19   CookieStruct;
     20   void_t;
     21 };
     22 
     23 struct CookieSubscription
     24 {
     25   nsString? name;
     26   nsString url;
     27 };
     28 
     29 struct CookieStoreResult
     30 {
     31   bool success;
     32   bool waitForNotification;
     33 };
     34 
     35 // This protocol is used for the CookieStore API
     36 [ManualDealloc]
     37 protocol PCookieStore
     38 {
     39   manager PBackground;
     40 
     41 parent:
     42   async GetRequest(nsIURI cookieURI,
     43                    OriginAttributes attrs,
     44                    OriginAttributes? partitionedAttrs,
     45                    bool thirdPartyContext,
     46                    bool partitionForeign,
     47                    bool usingStorageAccess,
     48                    bool isOn3PCBExceptionList,
     49                    bool matchName,
     50                    nsString name,
     51                    nsCString path,
     52                    bool onlyFirstMatch) returns (CookieStruct[] data);
     53 
     54   async SetRequest(nsIURI cookieURI,
     55                    OriginAttributes attrs,
     56                    bool thirdPartyContext,
     57                    bool partitionForeign,
     58                    bool usingStorageAccess,
     59                    bool isOn3PCBExceptionList,
     60                    nsString name,
     61                    nsString value,
     62                    bool session,
     63                    int64_t expires,
     64                    nsString domain,
     65                    nsString path,
     66                    int32_t sameSite,
     67                    bool partitioned,
     68                    nsID operationId) returns (CookieStoreResult result);
     69 
     70   async DeleteRequest(nsIURI cookieURI,
     71                       OriginAttributes attrs,
     72                       bool thirdPartyContext,
     73                       bool partitionForeign,
     74                       bool usingStorageAccess,
     75                       bool isOn3PCBExceptionList,
     76                       nsString name,
     77                       nsString domain,
     78                       nsString path,
     79                       bool partitioned,
     80                       nsID operationID) returns (bool waitForNotification);
     81 
     82   // We use PrincipalInfo because we need to interact with
     83   // ServiceWorkerRegistrar, which uses this object instead of nsIPrincipal.
     84   async GetSubscriptionsRequest(PrincipalInfo principalInfo,
     85                                 nsCString scopeURL) returns (CookieSubscription[] subscriptions);
     86 
     87   async SubscribeOrUnsubscribeRequest(PrincipalInfo principalInfo,
     88                                       nsCString scopeURL,
     89                                       CookieSubscription[] subscriptions,
     90                                       bool subscribe) returns (bool result);
     91 
     92   async Close();
     93 
     94 child:
     95   async __delete__();
     96 };
     97 
     98 } // namespace dom
     99 } // namespace mozilla