mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1577040 - Part 7: Get rid of nsIClassifiedChanel::IsTrackingResource(), r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D63305 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
cf9f5de771
commit
688f40008c
@ -241,11 +241,6 @@ NS_IMETHODIMP RemoteWebProgressRequest::SetLoadFlags(nsLoadFlags aLoadFlags) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RemoteWebProgressRequest::IsTrackingResource(bool* aIsTrackingResource) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RemoteWebProgressRequest::IsThirdPartyTrackingResource(
|
||||
bool* aIsTrackingResource) {
|
||||
|
@ -146,31 +146,6 @@ interface nsIClassifiedChannel : nsISupports
|
||||
CLASSIFIED_SOCIALTRACKING_LINKEDIN | CLASSIFIED_SOCIALTRACKING_TWITTER,
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the channel has loaded a resource that is classified as
|
||||
* tracker.
|
||||
* This is a helper attribute which returns the same value of
|
||||
* (classificationFlags & CLASSIFIED_ANY_BASIC_TRACKING) or
|
||||
* (classificationFlags & CLASSIFIED_ANY_STRICT_TRACKING) or
|
||||
* (classificationFlags & CLASSIFIED_ANY_SOCIAL_TRACKING)
|
||||
*
|
||||
* Note that top-level channels could be marked as tracking
|
||||
* resource. In order to identify third-party tracking resources
|
||||
* specifically, use isThirdPartyTrackingResource().
|
||||
*/
|
||||
boolean isTrackingResource();
|
||||
|
||||
%{ C++
|
||||
inline bool IsTrackingResource()
|
||||
{
|
||||
bool value = false;
|
||||
if (NS_SUCCEEDED(IsTrackingResource(&value)) && value) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
%}
|
||||
|
||||
/**
|
||||
* Returns true if the channel has been processed by URL-Classifier features
|
||||
* and is considered third-party with the top window URI, and if it has loaded
|
||||
|
@ -727,17 +727,6 @@ NS_IMETHODIMP ClassifierDummyChannel::GetClassificationFlags(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ClassifierDummyChannel::IsTrackingResource(
|
||||
bool* aIsTrackingResource) {
|
||||
MOZ_ASSERT(!mFirstPartyClassificationFlags ||
|
||||
!mThirdPartyClassificationFlags);
|
||||
*aIsTrackingResource = UrlClassifierCommon::IsTrackingClassificationFlag(
|
||||
mThirdPartyClassificationFlags) ||
|
||||
UrlClassifierCommon::IsTrackingClassificationFlag(
|
||||
mFirstPartyClassificationFlags);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ClassifierDummyChannel::IsThirdPartyTrackingResource(
|
||||
bool* aIsTrackingResource) {
|
||||
MOZ_ASSERT(
|
||||
|
@ -1474,17 +1474,6 @@ NS_IMETHODIMP HttpBaseChannel::SetTopLevelContentWindowId(uint64_t aWindowId) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::IsTrackingResource(bool* aIsTrackingResource) {
|
||||
MOZ_ASSERT(!mFirstPartyClassificationFlags ||
|
||||
!mThirdPartyClassificationFlags);
|
||||
*aIsTrackingResource = UrlClassifierCommon::IsTrackingClassificationFlag(
|
||||
mThirdPartyClassificationFlags) ||
|
||||
UrlClassifierCommon::IsTrackingClassificationFlag(
|
||||
mFirstPartyClassificationFlags);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::IsThirdPartyTrackingResource(bool* aIsTrackingResource) {
|
||||
MOZ_ASSERT(
|
||||
|
Loading…
Reference in New Issue
Block a user