Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.h

Issue 2647643004: Report nav timing 2 instance as soon as it's requested. (Closed)
Patch Set: make a copy of navigationTimingInfo for ResourceFetcher Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/timing/PerformanceBase.h
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.h b/third_party/WebKit/Source/core/timing/PerformanceBase.h
index 882a008281bcf5d309b7c80a0247cbfeb22701ff..9432f7d3d7221056863b253623841fb4cd04dd1f 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.h
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.h
@@ -88,7 +88,7 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
double timeOrigin() const { return m_timeOrigin; }
- PerformanceEntryVector getEntries() const;
+ PerformanceEntryVector getEntries();
PerformanceEntryVector getEntriesByType(const String& entryType);
PerformanceEntryVector getEntriesByName(const String& name,
const String& entryType);
@@ -112,7 +112,7 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
void addResourceTiming(const ResourceTimingInfo&);
- void addNavigationTiming(LocalFrame*);
+ void notifyNavigationTimingToObserver();
void addFirstPaintTiming(double startTime);
@@ -133,18 +133,16 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
void activateObserver(PerformanceObserver&);
void resumeSuspendedObservers();
- DECLARE_VIRTUAL_TRACE();
-
- private:
- static PerformanceNavigationTiming::NavigationType getNavigationType(
- NavigationType,
- const Document*);
-
static bool allowsTimingRedirect(const Vector<ResourceResponse>&,
const ResourceResponse&,
const SecurityOrigin&,
ExecutionContext*);
+ static SecurityOrigin* getSecurityOrigin(ExecutionContext*);
panicker 2017/02/03 23:53:52 Is this for calling from NT? If so, not worth maki
sunjian 2017/02/10 18:32:46 Made it inline in PerformanceNavigationTiming and
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
static bool passesTimingAllowCheck(const ResourceResponse&,
const SecurityOrigin&,
const AtomicString&,
@@ -155,6 +153,12 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
protected:
explicit PerformanceBase(double timeOrigin, RefPtr<WebTaskRunner>);
+ // Expect Performance to override this method,
+ // WorkerPerformance doesn't have to override this.
+ virtual PerformanceNavigationTiming* getNavigationTimingInstance() {
+ return nullptr;
+ }
+
bool isResourceTimingBufferFull();
void addResourceTimingBuffer(PerformanceEntry&);

Powered by Google App Engine
This is Rietveld 408576698