gecko-dev/netwerk/cookie/nsCookiePermission.h
Ehsan Akhgari bba7e3c8b0 Bug 1547114 - Part 8: Move nsCookiePermission to netwerk/cookie; r=baku
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
2019-04-26 22:31:57 +00:00

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