1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_net_CookieNotification_h
7 #define mozilla_net_CookieNotification_h
10 #include "nsICookieNotification.h"
11 #include "nsICookie.h"
16 namespace mozilla::net
{
18 class CookieNotification final
: public nsICookieNotification
{
22 NS_DECL_NSICOOKIENOTIFICATION
24 explicit CookieNotification(nsICookieNotification::Action aAction
,
25 nsICookie
* aCookie
, const nsACString
& aBaseDomain
,
26 nsIArray
* aBatchDeletedCookies
= nullptr,
27 uint64_t aBrowsingContextId
= 0)
30 mBaseDomain(aBaseDomain
),
31 mBatchDeletedCookies(aBatchDeletedCookies
),
32 mBrowsingContextId(aBrowsingContextId
){};
35 nsICookieNotification::Action mAction
;
36 nsCOMPtr
<nsICookie
> mCookie
;
37 nsCString mBaseDomain
;
38 nsCOMPtr
<nsIArray
> mBatchDeletedCookies
;
39 uint64_t mBrowsingContextId
= 0;
41 ~CookieNotification() = default;
44 } // namespace mozilla::net
46 #endif // mozilla_net_CookieNotification_h