OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 AtomicallyInitializedStatic(AtomicString&, timingAllowOrigin = *new AtomicSt
ring("timing-allow-origin")); | 164 AtomicallyInitializedStatic(AtomicString&, timingAllowOrigin = *new AtomicSt
ring("timing-allow-origin")); |
165 | 165 |
166 RefPtr<SecurityOrigin> resourceOrigin = SecurityOrigin::create(response.url(
)); | 166 RefPtr<SecurityOrigin> resourceOrigin = SecurityOrigin::create(response.url(
)); |
167 if (resourceOrigin->isSameSchemeHostPort(requestingDocument->securityOrigin(
))) | 167 if (resourceOrigin->isSameSchemeHostPort(requestingDocument->securityOrigin(
))) |
168 return true; | 168 return true; |
169 | 169 |
170 const AtomicString& timingAllowOriginString = response.httpHeaderField(timin
gAllowOrigin); | 170 const AtomicString& timingAllowOriginString = response.httpHeaderField(timin
gAllowOrigin); |
171 if (timingAllowOriginString.isEmpty() || equalIgnoringCase(timingAllowOrigin
String, "null")) | 171 if (timingAllowOriginString.isEmpty() || equalIgnoringCase(timingAllowOrigin
String, "null")) |
172 return false; | 172 return false; |
173 | 173 |
174 if (timingAllowOriginString == "*") | 174 if (timingAllowOriginString == starAtom) |
175 return true; | 175 return true; |
176 | 176 |
177 const String& securityOrigin = requestingDocument->securityOrigin()->toStrin
g(); | 177 const String& securityOrigin = requestingDocument->securityOrigin()->toStrin
g(); |
178 Vector<String> timingAllowOrigins; | 178 Vector<String> timingAllowOrigins; |
179 timingAllowOriginString.string().split(" ", timingAllowOrigins); | 179 timingAllowOriginString.string().split(" ", timingAllowOrigins); |
180 for (size_t i = 0; i < timingAllowOrigins.size(); ++i) { | 180 for (size_t i = 0; i < timingAllowOrigins.size(); ++i) { |
181 if (timingAllowOrigins[i] == securityOrigin) | 181 if (timingAllowOrigins[i] == securityOrigin) |
182 return true; | 182 return true; |
183 } | 183 } |
184 | 184 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 m_userTiming = UserTiming::create(this); | 271 m_userTiming = UserTiming::create(this); |
272 m_userTiming->clearMeasures(measureName); | 272 m_userTiming->clearMeasures(measureName); |
273 } | 273 } |
274 | 274 |
275 double Performance::now() const | 275 double Performance::now() const |
276 { | 276 { |
277 return 1000.0 * (monotonicallyIncreasingTime() - m_referenceTime); | 277 return 1000.0 * (monotonicallyIncreasingTime() - m_referenceTime); |
278 } | 278 } |
279 | 279 |
280 } // namespace WebCore | 280 } // namespace WebCore |
OLD | NEW |