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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceResourceTiming.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 allowRedirectDetails); 58 allowRedirectDetails);
59 } 59 }
60 60
61 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, 61 static PerformanceResourceTiming* create(const ResourceTimingInfo& info,
62 double timeOrigin, 62 double timeOrigin,
63 double startTime, 63 double startTime,
64 bool allowTimingDetails) { 64 bool allowTimingDetails) {
65 return new PerformanceResourceTiming(info, timeOrigin, startTime, 0.0, 65 return new PerformanceResourceTiming(info, timeOrigin, startTime, 0.0,
66 allowTimingDetails, false); 66 allowTimingDetails, false);
67 } 67 }
68 68
panicker 2017/02/03 23:53:52 Add link to design doc ...
sunjian 2017/02/10 18:32:46 Done.
69 AtomicString initiatorType() const; 69 virtual AtomicString initiatorType() const;
70 70 virtual DOMHighResTimeStamp workerStart() const;
71 DOMHighResTimeStamp workerStart() const;
72 virtual DOMHighResTimeStamp redirectStart() const; 71 virtual DOMHighResTimeStamp redirectStart() const;
73 virtual DOMHighResTimeStamp redirectEnd() const; 72 virtual DOMHighResTimeStamp redirectEnd() const;
74 virtual DOMHighResTimeStamp fetchStart() const; 73 virtual DOMHighResTimeStamp fetchStart() const;
75 DOMHighResTimeStamp domainLookupStart() const; 74 virtual DOMHighResTimeStamp domainLookupStart() const;
76 DOMHighResTimeStamp domainLookupEnd() const; 75 virtual DOMHighResTimeStamp domainLookupEnd() const;
77 DOMHighResTimeStamp connectStart() const; 76 virtual DOMHighResTimeStamp connectStart() const;
78 DOMHighResTimeStamp connectEnd() const; 77 virtual DOMHighResTimeStamp connectEnd() const;
79 DOMHighResTimeStamp secureConnectionStart() const; 78 virtual DOMHighResTimeStamp secureConnectionStart() const;
80 DOMHighResTimeStamp requestStart() const; 79 virtual DOMHighResTimeStamp requestStart() const;
81 DOMHighResTimeStamp responseStart() const; 80 virtual DOMHighResTimeStamp responseStart() const;
82 virtual DOMHighResTimeStamp responseEnd() const; 81 virtual DOMHighResTimeStamp responseEnd() const;
83 unsigned long long transferSize() const; 82 virtual unsigned long long transferSize() const;
84 unsigned long long encodedBodySize() const; 83 virtual unsigned long long encodedBodySize() const;
85 unsigned long long decodedBodySize() const; 84 virtual unsigned long long decodedBodySize() const;
86 85
87 protected: 86 protected:
88 void buildJSONValue(V8ObjectBuilder&) const override; 87 void buildJSONValue(V8ObjectBuilder&) const override;
89 88
90 PerformanceResourceTiming(const AtomicString& initiatorType, 89 // This constructor is for PerformanceNavigationTiming.
91 double timeOrigin, 90 PerformanceResourceTiming(const String& name,
92 ResourceLoadTiming*,
93 double lastRedirectEndTime,
94 double finishTime,
95 unsigned long long transferSize,
96 unsigned long long encodedBodyLength,
97 unsigned long long decodedBodyLength,
98 bool didReuseConnection,
99 bool allowTimingDetails,
100 bool allowRedirectDetails,
101 const String& name,
102 const String& entryType, 91 const String& entryType,
103 double startTime); 92 double startTime,
93 double duration);
104 94
105 private: 95 private:
106 PerformanceResourceTiming(const ResourceTimingInfo&, 96 PerformanceResourceTiming(const ResourceTimingInfo&,
107 double timeOrigin, 97 double timeOrigin,
108 double startTime, 98 double startTime,
109 double lastRedirectEndTime, 99 double lastRedirectEndTime,
110 bool m_allowTimingDetails, 100 bool m_allowTimingDetails,
111 bool m_allowRedirectDetails); 101 bool m_allowRedirectDetails);
112 102
113 double workerReady() const; 103 double workerReady() const;
114 104
115 AtomicString m_initiatorType; 105 AtomicString m_initiatorType;
116 double m_timeOrigin; 106 double m_timeOrigin;
117 RefPtr<ResourceLoadTiming> m_timing; 107 RefPtr<ResourceLoadTiming> m_timing;
118 double m_lastRedirectEndTime; 108 double m_lastRedirectEndTime;
119 double m_finishTime; 109 double m_finishTime;
120 unsigned long long m_transferSize; 110 unsigned long long m_transferSize;
121 unsigned long long m_encodedBodySize; 111 unsigned long long m_encodedBodySize;
122 unsigned long long m_decodedBodySize; 112 unsigned long long m_decodedBodySize;
123 bool m_didReuseConnection; 113 bool m_didReuseConnection;
124 bool m_allowTimingDetails; 114 bool m_allowTimingDetails;
125 bool m_allowRedirectDetails; 115 bool m_allowRedirectDetails;
126 }; 116 };
127 117
128 } // namespace blink 118 } // namespace blink
129 119
130 #endif // PerformanceResourceTiming_h 120 #endif // PerformanceResourceTiming_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698