зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1244116 - Telemetry for mixed content requests by plugins. r=smaug, p=ally
MozReview-Commit-ID: F9rOb1SdPnL --HG-- extra : rebase_source : 0b2aa83761880fb6e5a18c3a80ac86fe5ca16923
This commit is contained in:
Родитель
0704fd4ca2
Коммит
56bdfe820a
|
@ -1574,6 +1574,15 @@ nsDocument::~nsDocument()
|
|||
Accumulate(Telemetry::MIXED_CONTENT_PAGE_LOAD, mixedContentLevel);
|
||||
|
||||
Accumulate(Telemetry::SCROLL_LINKED_EFFECT_FOUND, mHasScrollLinkedEffect);
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -610,6 +610,14 @@ public:
|
|||
mHasMixedDisplayContentBlocked = aHasMixedDisplayContentBlocked;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the mixed content object subrequest flag for this document.
|
||||
*/
|
||||
void SetHasMixedContentObjectSubrequest(bool aHasMixedContentObjectSubrequest)
|
||||
{
|
||||
mHasMixedContentObjectSubrequest = aHasMixedContentObjectSubrequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tracking content blocked flag for this document.
|
||||
*/
|
||||
|
@ -2907,6 +2915,9 @@ protected:
|
|||
// True if a document has blocked Mixed Display/Passive Content (see nsMixedContentBlocker.cpp)
|
||||
bool mHasMixedDisplayContentBlocked : 1;
|
||||
|
||||
// True if a document loads a plugin object that attempts to load mixed content subresources through necko(see nsMixedContentBlocker.cpp)
|
||||
bool mHasMixedContentObjectSubrequest : 1;
|
||||
|
||||
// True if a document has blocked Tracking Content
|
||||
bool mHasTrackingContentBlocked : 1;
|
||||
|
||||
|
|
|
@ -773,6 +773,11 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
|
|||
}
|
||||
}
|
||||
|
||||
// set hasMixedContentObjectSubrequest on this object if necessary
|
||||
if (aContentType == TYPE_OBJECT_SUBREQUEST) {
|
||||
rootDoc->SetHasMixedContentObjectSubrequest(true);
|
||||
}
|
||||
|
||||
// If the content is display content, and the pref says display content should be blocked, block it.
|
||||
if (sBlockMixedDisplay && classification == eMixedDisplay) {
|
||||
if (allowMixedContent) {
|
||||
|
|
|
@ -7790,6 +7790,14 @@
|
|||
"n_values": 10,
|
||||
"description": "How often would blocked mixed content be allowed if HSTS upgrades were allowed? 0=display/no-HSTS, 1=display/HSTS, 2=active/no-HSTS, 3=active/HSTS"
|
||||
},
|
||||
"MIXED_CONTENT_OBJECT_SUBREQUEST": {
|
||||
"alert_emails": ["seceng@mozilla.org"],
|
||||
"bug_numbers": [1244116],
|
||||
"expires_in_version": "55",
|
||||
"kind": "enumerated",
|
||||
"n_values": 10,
|
||||
"description": "How often objects load insecure content on secure pages (counting pages, not objects). 0=pages with no mixed object subrequests, 1=pages with mixed object subrequests"
|
||||
},
|
||||
"COOKIE_SCHEME_SECURITY": {
|
||||
"alert_emails": ["seceng@mozilla.org"],
|
||||
"expires_in_version": "50",
|
||||
|
|
Загрузка…
Ссылка в новой задаче