Bug 1869043 assert that graph set access is main thread only r=padenot
[gecko.git] / netwerk / cookie / CookieNotification.h
blobc619ce56c145ea4690cd64b7987cc123734c56c9
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
9 #include "nsIArray.h"
10 #include "nsICookieNotification.h"
11 #include "nsICookie.h"
12 #include "nsCOMPtr.h"
13 #include "nsTArray.h"
14 #include "nsString.h"
16 namespace mozilla::net {
18 class CookieNotification final : public nsICookieNotification {
19 public:
20 // nsISupports
21 NS_DECL_ISUPPORTS
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)
28 : mAction(aAction),
29 mCookie(aCookie),
30 mBaseDomain(aBaseDomain),
31 mBatchDeletedCookies(aBatchDeletedCookies),
32 mBrowsingContextId(aBrowsingContextId){};
34 private:
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