Bug 1588538 - Add missing file.
[gecko.git] / netwerk / cookie / nsCookiePermission.h
bloba3539d13a6c749c3dbb375662f478f1031d24015
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/. */
5 #ifndef nsCookiePermission_h__
6 #define nsCookiePermission_h__
8 #include "nsICookiePermission.h"
9 #include "nsPermissionManager.h"
11 class nsCookiePermission final : public nsICookiePermission {
12 public:
13 NS_DECL_ISUPPORTS
14 NS_DECL_NSICOOKIEPERMISSION
16 // Singleton accessor
17 static already_AddRefed<nsICookiePermission> GetOrCreate();
19 bool Init();
21 private:
22 ~nsCookiePermission() = default;
24 bool EnsureInitialized() { return (mPermMgr != nullptr) || Init(); };
26 RefPtr<nsPermissionManager> mPermMgr;
29 #endif