зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1603187 - P3. Add Anonymize method. r=smaug
This method will be used by the DocumentLoadListener on the timing information object before sending it to the new content process following a cross-origin redirect. Differential Revision: https://phabricator.services.mozilla.com/D57939 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a0bcbb1eff
Коммит
1a27f6f0f6
|
@ -61,6 +61,14 @@ void nsDOMNavigationTiming::Clear() {
|
|||
mDocShellHasBeenActiveSinceNavigationStart = false;
|
||||
}
|
||||
|
||||
void nsDOMNavigationTiming::Anonymize(nsIURI* aFinalURI) {
|
||||
mLoadedURI = aFinalURI;
|
||||
mUnloadedURI = nullptr;
|
||||
mBeforeUnloadStart = TimeStamp();
|
||||
mUnloadStart = TimeStamp();
|
||||
mUnloadEnd = TimeStamp();
|
||||
}
|
||||
|
||||
DOMTimeMilliSec nsDOMNavigationTiming::TimeStampToDOM(TimeStamp aStamp) const {
|
||||
if (aStamp.IsNull()) {
|
||||
return 0;
|
||||
|
|
|
@ -174,6 +174,10 @@ class nsDOMNavigationTiming final : public mozilla::RelativeTimeline {
|
|||
return duration.ToMilliseconds();
|
||||
}
|
||||
|
||||
// Called by the DocumentLoadListener before sending the timing information
|
||||
// to the new content process.
|
||||
void Anonymize(nsIURI* aFinalURI);
|
||||
|
||||
private:
|
||||
friend class nsDocShell;
|
||||
nsDOMNavigationTiming(nsDocShell* aDocShell, nsDOMNavigationTiming* aOther);
|
||||
|
|
Загрузка…
Ссылка в новой задаче