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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceLoadTiming.cpp

Issue 1828203005: Expose SPDY pushes in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests Created 4 years, 8 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/network/ResourceLoadTiming.h" 5 #include "platform/network/ResourceLoadTiming.h"
6 6
7 #include "platform/TraceEvent.h" 7 #include "platform/TraceEvent.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 ResourceLoadTiming::ResourceLoadTiming() 11 ResourceLoadTiming::ResourceLoadTiming()
12 : m_requestTime(0) 12 : m_requestTime(0)
13 , m_proxyStart(0) 13 , m_proxyStart(0)
14 , m_proxyEnd(0) 14 , m_proxyEnd(0)
15 , m_dnsStart(0) 15 , m_dnsStart(0)
16 , m_dnsEnd(0) 16 , m_dnsEnd(0)
17 , m_connectStart(0) 17 , m_connectStart(0)
18 , m_connectEnd(0) 18 , m_connectEnd(0)
19 , m_workerStart(0) 19 , m_workerStart(0)
20 , m_workerReady(0) 20 , m_workerReady(0)
21 , m_sendStart(0) 21 , m_sendStart(0)
22 , m_sendEnd(0) 22 , m_sendEnd(0)
23 , m_receiveHeadersEnd(0) 23 , m_receiveHeadersEnd(0)
24 , m_sslStart(0) 24 , m_sslStart(0)
25 , m_sslEnd(0) 25 , m_sslEnd(0)
26 , m_pushStart(0)
27 , m_pushEnd(0)
26 { 28 {
27 } 29 }
28 30
29 PassRefPtr<ResourceLoadTiming> ResourceLoadTiming::create() 31 PassRefPtr<ResourceLoadTiming> ResourceLoadTiming::create()
30 { 32 {
31 return adoptRef(new ResourceLoadTiming); 33 return adoptRef(new ResourceLoadTiming);
32 } 34 }
33 35
34 PassRefPtr<ResourceLoadTiming> ResourceLoadTiming::deepCopy() 36 PassRefPtr<ResourceLoadTiming> ResourceLoadTiming::deepCopy()
35 { 37 {
36 RefPtr<ResourceLoadTiming> timing = create(); 38 RefPtr<ResourceLoadTiming> timing = create();
37 timing->m_requestTime = m_requestTime; 39 timing->m_requestTime = m_requestTime;
38 timing->m_proxyStart = m_proxyStart; 40 timing->m_proxyStart = m_proxyStart;
39 timing->m_proxyEnd = m_proxyEnd; 41 timing->m_proxyEnd = m_proxyEnd;
40 timing->m_dnsStart = m_dnsStart; 42 timing->m_dnsStart = m_dnsStart;
41 timing->m_dnsEnd = m_dnsEnd; 43 timing->m_dnsEnd = m_dnsEnd;
42 timing->m_connectStart = m_connectStart; 44 timing->m_connectStart = m_connectStart;
43 timing->m_connectEnd = m_connectEnd; 45 timing->m_connectEnd = m_connectEnd;
44 timing->m_workerStart = m_workerStart; 46 timing->m_workerStart = m_workerStart;
45 timing->m_workerReady = m_workerReady; 47 timing->m_workerReady = m_workerReady;
46 timing->m_sendStart = m_sendStart; 48 timing->m_sendStart = m_sendStart;
47 timing->m_sendEnd = m_sendEnd; 49 timing->m_sendEnd = m_sendEnd;
48 timing->m_receiveHeadersEnd = m_receiveHeadersEnd; 50 timing->m_receiveHeadersEnd = m_receiveHeadersEnd;
49 timing->m_sslStart = m_sslStart; 51 timing->m_sslStart = m_sslStart;
50 timing->m_sslEnd = m_sslEnd; 52 timing->m_sslEnd = m_sslEnd;
53 timing->m_pushStart = m_pushStart;
54 timing->m_pushEnd = m_pushEnd;
51 return timing.release(); 55 return timing.release();
52 } 56 }
53 57
54 bool ResourceLoadTiming::operator==(const ResourceLoadTiming& other) const 58 bool ResourceLoadTiming::operator==(const ResourceLoadTiming& other) const
55 { 59 {
56 return m_requestTime == other.m_requestTime 60 return m_requestTime == other.m_requestTime
57 && m_proxyStart == other.m_proxyStart 61 && m_proxyStart == other.m_proxyStart
58 && m_proxyEnd == other.m_proxyEnd 62 && m_proxyEnd == other.m_proxyEnd
59 && m_dnsStart == other.m_dnsStart 63 && m_dnsStart == other.m_dnsStart
60 && m_dnsEnd == other.m_dnsEnd 64 && m_dnsEnd == other.m_dnsEnd
61 && m_connectStart == other.m_connectStart 65 && m_connectStart == other.m_connectStart
62 && m_connectEnd == other.m_connectEnd 66 && m_connectEnd == other.m_connectEnd
63 && m_workerStart == other.m_workerStart 67 && m_workerStart == other.m_workerStart
64 && m_workerReady == other.m_workerReady 68 && m_workerReady == other.m_workerReady
65 && m_sendStart == other.m_sendStart 69 && m_sendStart == other.m_sendStart
66 && m_sendEnd == other.m_sendEnd 70 && m_sendEnd == other.m_sendEnd
67 && m_receiveHeadersEnd == other.m_receiveHeadersEnd 71 && m_receiveHeadersEnd == other.m_receiveHeadersEnd
68 && m_sslStart == other.m_sslStart 72 && m_sslStart == other.m_sslStart
69 && m_sslEnd == other.m_sslEnd; 73 && m_sslEnd == other.m_sslEnd
74 && m_pushStart == other.m_pushStart
75 && m_pushEnd == other.m_pushEnd;
70 } 76 }
71 77
72 bool ResourceLoadTiming::operator!=(const ResourceLoadTiming& other) const 78 bool ResourceLoadTiming::operator!=(const ResourceLoadTiming& other) const
73 { 79 {
74 return !(*this == other); 80 return !(*this == other);
75 } 81 }
76 82
77 void ResourceLoadTiming::setDnsStart(double dnsStart) 83 void ResourceLoadTiming::setDnsStart(double dnsStart)
78 { 84 {
79 m_dnsStart = dnsStart; 85 m_dnsStart = dnsStart;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void ResourceLoadTiming::setSslStart(double sslStart) 144 void ResourceLoadTiming::setSslStart(double sslStart)
139 { 145 {
140 m_sslStart = sslStart; 146 m_sslStart = sslStart;
141 } 147 }
142 148
143 void ResourceLoadTiming::setSslEnd(double sslEnd) 149 void ResourceLoadTiming::setSslEnd(double sslEnd)
144 { 150 {
145 m_sslEnd = sslEnd; 151 m_sslEnd = sslEnd;
146 } 152 }
147 153
154 void ResourceLoadTiming::setPushStart(double pushStart)
155 {
156 m_pushStart = pushStart;
157 }
158
159 void ResourceLoadTiming::setPushEnd(double pushEnd)
160 {
161 m_pushEnd = pushEnd;
162 }
163
148 double ResourceLoadTiming::calculateMillisecondDelta(double time) const 164 double ResourceLoadTiming::calculateMillisecondDelta(double time) const
149 { 165 {
150 return time ? (time - m_requestTime) * 1000 : -1; 166 return time ? (time - m_requestTime) * 1000 : -1;
151 } 167 }
152 168
153 } // namespace blink 169 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceLoadTiming.h ('k') | third_party/WebKit/public/platform/WebURLLoadTiming.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698