Files
tubestation/dom/performance/PerformanceStorage.h
Kershaw Chang ae4dd4d9b7 Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku
Currently, the document entry is created at the first time when some JS code tries to access it. But for the case when server timing headers exist for a document loading channel, we need to create the document entry and save the server timing data in the document entry.
If we don’t do this, the server timing data would be lost since the http channel will be deleted.

MozReview-Commit-ID: B5ksAZvZACq
2018-01-12 03:13:00 +01:00

38 lines
947 B
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_PerformanceStorage_h
#define mozilla_dom_PerformanceStorage_h
#include "nsISupportsImpl.h"
class nsIHttpChannel;
class nsITimedChannel;
namespace mozilla {
namespace dom {
class PerformanceTimingData;
class PerformanceStorage
{
public:
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
virtual void AddEntry(nsIHttpChannel* aChannel,
nsITimedChannel* aTimedChannel) = 0;
virtual void CreateDocumentEntry(nsITimedChannel* aChannel) = 0;
protected:
virtual ~PerformanceStorage() {}
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_PerformanceStorage_h