tor-browser

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

PCookieService.ipdl (2659B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
      3 
      4 /* This Source Code Form is subject to the terms of the Mozilla Public
      5  * License, v. 2.0. If a copy of the MPL was not distributed with this
      6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      7 
      8 include protocol PNecko;
      9 include NeckoChannelParams;
     10 
     11 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
     12 [RefCounted] using class nsIURI from "mozilla/ipc/URIUtils.h";
     13 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
     14 using struct nsID from "nsID.h";
     15 
     16 namespace mozilla {
     17 namespace net {
     18 
     19 /**
     20  * PCookieService
     21  *
     22  * Provides IPDL methods for setting and getting cookies. These are stored on
     23  * and managed by the parent; the child process goes through the parent for
     24  * all cookie operations. Lower-level programmatic operations (i.e. those
     25  * provided by the nsICookieManager interface) are not
     26  * currently implemented and requesting these interfaces in the child will fail.
     27  *
     28  * @see nsICookieService
     29  * @see nsICookiePermission
     30  */
     31 
     32 [ManualDealloc, NestedUpTo=inside_cpow] sync protocol PCookieService
     33 {
     34   manager PNecko;
     35 
     36 parent:
     37   [Nested=inside_cpow] async SetCookies(nsCString baseDomain,
     38                                         OriginAttributes attrs,
     39                                         nullable nsIURI host,
     40                                         bool fromHttp,
     41                                         bool isThirdParty,
     42                                         CookieStruct[] cookies);
     43 
     44   async GetCookieList(nullable nsIURI host,
     45                         bool isForeign,
     46                         bool isThirdPartyTrackingResource,
     47                         bool isThirdPartySocialTrackingResource,
     48                         bool firstPartyStorageAccessPermissionGranted,
     49                         uint32_t rejectedReason,
     50                         bool isSafeTopLevelNav,
     51                         bool isSameSiteForeign,
     52                         bool hadCrossSiteRedirects,
     53                         OriginAttributes[] attrsList)
     54                         returns (CookieStructTable[] cookies);
     55 
     56   async __delete__();
     57 
     58 child:
     59   async TrackCookiesLoad(CookieStructTable[] cookiesListTable);
     60 
     61   async RemoveCookie(CookieStruct cookie,
     62                      OriginAttributes attrs,
     63                      nsID? operationId);
     64 
     65   async RemoveBatchDeletedCookies(CookieStruct[] cookiesList,
     66                                   OriginAttributes[] attrsList);
     67 
     68   async RemoveAll();
     69 
     70   async AddCookie(CookieStruct cookie,
     71                   OriginAttributes attrs,
     72                   nsID? operationId);
     73 };
     74 
     75 }
     76 }
     77