зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1413512 -- Added a telemtry for counting of the HTTP redirection that triggered by top-level document or by subresource. r=schien data=francois
This commit is contained in:
Родитель
331eac4d0a
Коммит
d0eb2b7593
|
@ -119,6 +119,8 @@
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
using mozilla::Telemetry::LABELS_NETWORK_HTTP_REDIRECT_TO_SCHEME;
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
|
@ -828,14 +830,28 @@ nsHttpHandler::AsyncOnChannelRedirect(nsIChannel* oldChan,
|
|||
uint32_t flags,
|
||||
nsIEventTarget* mainThreadEventTarget)
|
||||
{
|
||||
// TODO E10S This helper has to be initialized on the other process
|
||||
RefPtr<nsAsyncRedirectVerifyHelper> redirectCallbackHelper =
|
||||
new nsAsyncRedirectVerifyHelper();
|
||||
MOZ_ASSERT(NS_IsMainThread() && (oldChan && newChan));
|
||||
|
||||
return redirectCallbackHelper->Init(oldChan,
|
||||
newChan,
|
||||
flags,
|
||||
mainThreadEventTarget);
|
||||
nsCOMPtr<nsIURI> newURI;
|
||||
newChan->GetURI(getter_AddRefs(newURI));
|
||||
MOZ_ASSERT(newURI);
|
||||
|
||||
nsAutoCString scheme;
|
||||
newURI->GetScheme(scheme);
|
||||
MOZ_ASSERT(!scheme.IsEmpty());
|
||||
|
||||
Telemetry::AccumulateCategoricalKeyed(
|
||||
scheme,
|
||||
oldChan->IsDocument()
|
||||
? LABELS_NETWORK_HTTP_REDIRECT_TO_SCHEME::topLevel
|
||||
: LABELS_NETWORK_HTTP_REDIRECT_TO_SCHEME::subresource);
|
||||
|
||||
// TODO E10S This helper has to be initialized on the other process
|
||||
RefPtr<nsAsyncRedirectVerifyHelper> redirectCallbackHelper =
|
||||
new nsAsyncRedirectVerifyHelper();
|
||||
|
||||
return redirectCallbackHelper->Init(
|
||||
oldChan, newChan, flags, mainThreadEventTarget);
|
||||
}
|
||||
|
||||
/* static */ nsresult
|
||||
|
|
|
@ -2383,6 +2383,16 @@
|
|||
"labels": ["NotSent", "CachedContentUsed", "CachedContentNotUsed"],
|
||||
"description": "Stats for validation requests when cache won the race."
|
||||
},
|
||||
"NETWORK_HTTP_REDIRECT_TO_SCHEME" :{
|
||||
"record_in_processes": ["main"],
|
||||
"alert_emails": ["necko@mozilla.com", "seceng-telemetry@mozilla.com", "jkt@mozilla.com"],
|
||||
"bug_numbers": [1413512],
|
||||
"expires_in_version": "64",
|
||||
"kind": "categorical",
|
||||
"keyed": true,
|
||||
"description": "Count of the HTTP redirection that triggered by top-level document or by subresource, keyed by the URL scheme redirected to.",
|
||||
"labels": ["topLevel", "subresource"]
|
||||
},
|
||||
"HTTP_AUTH_DIALOG_STATS_3": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"expires_in_version": "61",
|
||||
|
|
Загрузка…
Ссылка в новой задаче