From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- netwerk/cookie/CookieNotification.h | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 netwerk/cookie/CookieNotification.h (limited to 'netwerk/cookie/CookieNotification.h') diff --git a/netwerk/cookie/CookieNotification.h b/netwerk/cookie/CookieNotification.h new file mode 100644 index 0000000000..c619ce56c1 --- /dev/null +++ b/netwerk/cookie/CookieNotification.h @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. */ + +#ifndef mozilla_net_CookieNotification_h +#define mozilla_net_CookieNotification_h + +#include "nsIArray.h" +#include "nsICookieNotification.h" +#include "nsICookie.h" +#include "nsCOMPtr.h" +#include "nsTArray.h" +#include "nsString.h" + +namespace mozilla::net { + +class CookieNotification final : public nsICookieNotification { + public: + // nsISupports + NS_DECL_ISUPPORTS + NS_DECL_NSICOOKIENOTIFICATION + + explicit CookieNotification(nsICookieNotification::Action aAction, + nsICookie* aCookie, const nsACString& aBaseDomain, + nsIArray* aBatchDeletedCookies = nullptr, + uint64_t aBrowsingContextId = 0) + : mAction(aAction), + mCookie(aCookie), + mBaseDomain(aBaseDomain), + mBatchDeletedCookies(aBatchDeletedCookies), + mBrowsingContextId(aBrowsingContextId){}; + + private: + nsICookieNotification::Action mAction; + nsCOMPtr mCookie; + nsCString mBaseDomain; + nsCOMPtr mBatchDeletedCookies; + uint64_t mBrowsingContextId = 0; + + ~CookieNotification() = default; +}; + +} // namespace mozilla::net + +#endif // mozilla_net_CookieNotification_h -- cgit v1.2.3