• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  *     * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #include "config.h"
32 #include "public/platform/WebURLLoadTiming.h"
33 
34 #include "platform/network/ResourceLoadTiming.h"
35 #include "public/platform/WebString.h"
36 
37 namespace blink {
38 
initialize()39 void WebURLLoadTiming::initialize()
40 {
41     m_private = ResourceLoadTiming::create();
42 }
43 
reset()44 void WebURLLoadTiming::reset()
45 {
46     m_private.reset();
47 }
48 
assign(const WebURLLoadTiming & other)49 void WebURLLoadTiming::assign(const WebURLLoadTiming& other)
50 {
51     m_private = other.m_private;
52 }
53 
requestTime() const54 double WebURLLoadTiming::requestTime() const
55 {
56     return m_private->requestTime;
57 }
58 
setRequestTime(double time)59 void WebURLLoadTiming::setRequestTime(double time)
60 {
61     m_private->requestTime = time;
62 }
63 
proxyStart() const64 double WebURLLoadTiming::proxyStart() const
65 {
66     return m_private->proxyStart;
67 }
68 
setProxyStart(double start)69 void WebURLLoadTiming::setProxyStart(double start)
70 {
71     m_private->proxyStart = start;
72 }
73 
proxyEnd() const74 double WebURLLoadTiming::proxyEnd() const
75 {
76     return m_private->proxyEnd;
77 }
78 
setProxyEnd(double end)79 void WebURLLoadTiming::setProxyEnd(double end)
80 {
81     m_private->proxyEnd = end;
82 }
83 
dnsStart() const84 double WebURLLoadTiming::dnsStart() const
85 {
86     return m_private->dnsStart;
87 }
88 
setDNSStart(double start)89 void WebURLLoadTiming::setDNSStart(double start)
90 {
91     m_private->dnsStart = start;
92 }
93 
dnsEnd() const94 double WebURLLoadTiming::dnsEnd() const
95 {
96     return m_private->dnsEnd;
97 }
98 
setDNSEnd(double end)99 void WebURLLoadTiming::setDNSEnd(double end)
100 {
101     m_private->dnsEnd = end;
102 }
103 
connectStart() const104 double WebURLLoadTiming::connectStart() const
105 {
106     return m_private->connectStart;
107 }
108 
setConnectStart(double start)109 void WebURLLoadTiming::setConnectStart(double start)
110 {
111     m_private->connectStart = start;
112 }
113 
connectEnd() const114 double WebURLLoadTiming::connectEnd() const
115 {
116     return m_private->connectEnd;
117 }
118 
setConnectEnd(double end)119 void WebURLLoadTiming::setConnectEnd(double end)
120 {
121     m_private->connectEnd = end;
122 }
123 
serviceWorkerFetchStart() const124 double WebURLLoadTiming::serviceWorkerFetchStart() const
125 {
126     return m_private->serviceWorkerFetchStart;
127 }
128 
setServiceWorkerFetchStart(double start)129 void WebURLLoadTiming::setServiceWorkerFetchStart(double start)
130 {
131     m_private->serviceWorkerFetchStart = start;
132 }
133 
serviceWorkerFetchReady() const134 double WebURLLoadTiming::serviceWorkerFetchReady() const
135 {
136     return m_private->serviceWorkerFetchReady;
137 }
138 
setServiceWorkerFetchReady(double time)139 void WebURLLoadTiming::setServiceWorkerFetchReady(double time)
140 {
141     m_private->serviceWorkerFetchReady = time;
142 }
143 
serviceWorkerFetchEnd() const144 double WebURLLoadTiming::serviceWorkerFetchEnd() const
145 {
146     return m_private->serviceWorkerFetchEnd;
147 }
148 
setServiceWorkerFetchEnd(double end)149 void WebURLLoadTiming::setServiceWorkerFetchEnd(double end)
150 {
151     m_private->serviceWorkerFetchEnd = end;
152 }
153 
sendStart() const154 double WebURLLoadTiming::sendStart() const
155 {
156     return m_private->sendStart;
157 }
158 
setSendStart(double start)159 void WebURLLoadTiming::setSendStart(double start)
160 {
161     m_private->sendStart = start;
162 }
163 
sendEnd() const164 double WebURLLoadTiming::sendEnd() const
165 {
166     return m_private->sendEnd;
167 }
168 
setSendEnd(double end)169 void WebURLLoadTiming::setSendEnd(double end)
170 {
171     m_private->sendEnd = end;
172 }
173 
receiveHeadersEnd() const174 double WebURLLoadTiming::receiveHeadersEnd() const
175 {
176     return m_private->receiveHeadersEnd;
177 }
178 
setReceiveHeadersEnd(double end)179 void WebURLLoadTiming::setReceiveHeadersEnd(double end)
180 {
181     m_private->receiveHeadersEnd = end;
182 }
183 
sslStart() const184 double WebURLLoadTiming::sslStart() const
185 {
186     return m_private->sslStart;
187 }
188 
setSSLStart(double start)189 void WebURLLoadTiming::setSSLStart(double start)
190 {
191     m_private->sslStart = start;
192 }
193 
sslEnd() const194 double WebURLLoadTiming::sslEnd() const
195 {
196     return m_private->sslEnd;
197 }
198 
setSSLEnd(double end)199 void WebURLLoadTiming::setSSLEnd(double end)
200 {
201     m_private->sslEnd = end;
202 }
203 
WebURLLoadTiming(const PassRefPtr<ResourceLoadTiming> & value)204 WebURLLoadTiming::WebURLLoadTiming(const PassRefPtr<ResourceLoadTiming>& value)
205     : m_private(value)
206 {
207 }
208 
operator =(const PassRefPtr<ResourceLoadTiming> & value)209 WebURLLoadTiming& WebURLLoadTiming::operator=(const PassRefPtr<ResourceLoadTiming>& value)
210 {
211     m_private = value;
212     return *this;
213 }
214 
operator PassRefPtr<ResourceLoadTiming>() const215 WebURLLoadTiming::operator PassRefPtr<ResourceLoadTiming>() const
216 {
217     return m_private.get();
218 }
219 
220 } // namespace blink
221