зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
cf9f5de771
Коммит
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(
|
||||
|
|
Загрузка…
Ссылка в новой задаче