fune/toolkit/components/cookiebanners/nsClickRule.cpp
Tim Huang 8fe2954e7c Bug 1783045 - Part 2: Implementing nsIClickRule and nsICookieBannerService.getClickRuleForDomain(). r=pbz
This patch implements the nsIClickRule that represents the rule that
instructs the banner auto-clicking to handle the cookie banner. We also
implement the nsICookieBannerService.getClickRuleForDoamin() that allows
fetching the clicking rule from the service for the given domain.

Differential Revision: https://phabricator.services.mozilla.com/D154805
2022-08-23 22:11:53 +00:00

37 lines
766 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/. */
#include "nsClickRule.h"
#include "nsString.h"
namespace mozilla {
NS_IMPL_ISUPPORTS(nsClickRule, nsIClickRule)
NS_IMETHODIMP
nsClickRule::GetPresence(nsACString& aPresence) {
aPresence.Assign(mPresence);
return NS_OK;
}
NS_IMETHODIMP
nsClickRule::GetHide(nsACString& aHide) {
aHide.Assign(mHide);
return NS_OK;
}
NS_IMETHODIMP
nsClickRule::GetOptOut(nsACString& aOptOut) {
aOptOut.Assign(mOptOut);
return NS_OK;
}
NS_IMETHODIMP
nsClickRule::GetOptIn(nsACString& aOptIn) {
aOptIn.Assign(mOptIn);
return NS_OK;
}
} // namespace mozilla