bug 819734 - Token Bucket for Network Requests [a/b test] r=honzab

This commit is contained in:
Patrick McManus
2013-04-15 09:41:27 -04:00
parent 2adaf5471e
commit dd4f9aa02c
13 changed files with 293 additions and 43 deletions

View File

@@ -94,7 +94,7 @@
// so we can associate the document URI with the load group.
// until this point, we have an evil hack:
#include "nsIHttpChannelInternal.h"
#include "nsPILoadGroupInternal.h"
// Local Includes
#include "nsDocShellLoadInfo.h"
@@ -6548,10 +6548,15 @@ nsDocShell::EndPageLoad(nsIWebProgress * aProgress,
if (timingChannel) {
TimeStamp channelCreationTime;
rv = timingChannel->GetChannelCreation(&channelCreationTime);
if (NS_SUCCEEDED(rv) && !channelCreationTime.IsNull())
if (NS_SUCCEEDED(rv) && !channelCreationTime.IsNull()) {
Telemetry::AccumulateTimeDelta(
Telemetry::TOTAL_CONTENT_PAGE_LOAD_TIME,
channelCreationTime);
nsCOMPtr<nsPILoadGroupInternal> internalLoadGroup =
do_QueryInterface(mLoadGroup);
if (internalLoadGroup)
internalLoadGroup->OnEndPageLoad(aChannel);
}
}
// Timing is picked up by the window, we don't need it anymore