mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
bba7e3c8b0
Differential Revision: https://phabricator.services.mozilla.com/D29078 --HG-- rename : extensions/cookie/nsCookiePermission.cpp => netwerk/cookie/nsCookiePermission.cpp rename : extensions/cookie/nsCookiePermission.h => netwerk/cookie/nsCookiePermission.h extra : moz-landing-system : lando
31 lines
757 B
C++
31 lines
757 B
C++
/* 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 nsCookiePermission_h__
|
|
#define nsCookiePermission_h__
|
|
|
|
#include "nsICookiePermission.h"
|
|
#include "nsIPermissionManager.h"
|
|
#include "nsCOMPtr.h"
|
|
|
|
class nsCookiePermission final : public nsICookiePermission {
|
|
public:
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSICOOKIEPERMISSION
|
|
|
|
// Singleton accessor
|
|
static already_AddRefed<nsICookiePermission> GetOrCreate();
|
|
|
|
bool Init();
|
|
|
|
private:
|
|
~nsCookiePermission() = default;
|
|
|
|
bool EnsureInitialized() { return (mPermMgr != nullptr) || Init(); };
|
|
|
|
nsCOMPtr<nsIPermissionManager> mPermMgr;
|
|
};
|
|
|
|
#endif
|