Telemetry: Remove stubs and related code

This commit is contained in:
adeshkp 2019-01-12 06:20:31 -05:00 committed by Roy Tam
commit aea50f182f
134 changed files with 68 additions and 3422 deletions

View file

@ -1395,63 +1395,6 @@ nsDocument::~nsDocument()
NS_ASSERTION(!mIsShowing, "Destroying a currently-showing document");
if (IsTopLevelContentDocument()) {
//don't report for about: pages
if (!IsAboutPage()) {
// Record the page load
uint32_t pageLoaded = 1;
Accumulate(Telemetry::MIXED_CONTENT_UNBLOCK_COUNTER, pageLoaded);
// Record the mixed content status of the docshell in Telemetry
enum {
NO_MIXED_CONTENT = 0, // There is no Mixed Content on the page
MIXED_DISPLAY_CONTENT = 1, // The page attempted to load Mixed Display Content
MIXED_ACTIVE_CONTENT = 2, // The page attempted to load Mixed Active Content
MIXED_DISPLAY_AND_ACTIVE_CONTENT = 3 // The page attempted to load Mixed Display & Mixed Active Content
};
bool mixedActiveLoaded = GetHasMixedActiveContentLoaded();
bool mixedActiveBlocked = GetHasMixedActiveContentBlocked();
bool mixedDisplayLoaded = GetHasMixedDisplayContentLoaded();
bool mixedDisplayBlocked = GetHasMixedDisplayContentBlocked();
bool hasMixedDisplay = (mixedDisplayBlocked || mixedDisplayLoaded);
bool hasMixedActive = (mixedActiveBlocked || mixedActiveLoaded);
uint32_t mixedContentLevel = NO_MIXED_CONTENT;
if (hasMixedDisplay && hasMixedActive) {
mixedContentLevel = MIXED_DISPLAY_AND_ACTIVE_CONTENT;
} else if (hasMixedActive){
mixedContentLevel = MIXED_ACTIVE_CONTENT;
} else if (hasMixedDisplay) {
mixedContentLevel = MIXED_DISPLAY_CONTENT;
}
Accumulate(Telemetry::MIXED_CONTENT_PAGE_LOAD, mixedContentLevel);
// record mixed object subrequest telemetry
if (mHasMixedContentObjectSubrequest) {
/* mixed object subrequest loaded on page*/
Accumulate(Telemetry::MIXED_CONTENT_OBJECT_SUBREQUEST, 1);
} else {
/* no mixed object subrequests loaded on page*/
Accumulate(Telemetry::MIXED_CONTENT_OBJECT_SUBREQUEST, 0);
}
// record CSP telemetry on this document
if (mHasCSP) {
Accumulate(Telemetry::CSP_DOCUMENTS_COUNT, 1);
}
if (mHasUnsafeInlineCSP) {
Accumulate(Telemetry::CSP_UNSAFE_INLINE_DOCUMENTS_COUNT, 1);
}
if (mHasUnsafeEvalCSP) {
Accumulate(Telemetry::CSP_UNSAFE_EVAL_DOCUMENTS_COUNT, 1);
}
}
}
ReportUseCounters();
mInDestructor = true;
mInUnlinkOrDeletion = true;
@ -12353,23 +12296,6 @@ nsIDocument::InlineScriptAllowedByCSP()
return allowsInlineScript;
}
static bool
MightBeAboutOrChromeScheme(nsIURI* aURI)
{
MOZ_ASSERT(aURI);
bool isAbout = true;
bool isChrome = true;
aURI->SchemeIs("about", &isAbout);
aURI->SchemeIs("chrome", &isChrome);
return isAbout || isChrome;
}
void
nsDocument::ReportUseCounters()
{
/* STUB */
}
void
nsDocument::AddIntersectionObserver(DOMIntersectionObserver* aObserver)
{