| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 return true; | 222 return true; |
| 223 } | 223 } |
| 224 | 224 |
| 225 void PerformanceBase::addResourceTiming(const ResourceTimingInfo& info) | 225 void PerformanceBase::addResourceTiming(const ResourceTimingInfo& info) |
| 226 { | 226 { |
| 227 if (isResourceTimingBufferFull() && !hasObserverFor(PerformanceEntry::Resour
ce)) | 227 if (isResourceTimingBufferFull() && !hasObserverFor(PerformanceEntry::Resour
ce)) |
| 228 return; | 228 return; |
| 229 SecurityOrigin* securityOrigin = nullptr; | 229 SecurityOrigin* securityOrigin = nullptr; |
| 230 if (ExecutionContext* context = executionContext()) | 230 if (ExecutionContext* context = getExecutionContext()) |
| 231 securityOrigin = context->securityOrigin(); | 231 securityOrigin = context->getSecurityOrigin(); |
| 232 if (!securityOrigin) | 232 if (!securityOrigin) |
| 233 return; | 233 return; |
| 234 | 234 |
| 235 const ResourceResponse& finalResponse = info.finalResponse(); | 235 const ResourceResponse& finalResponse = info.finalResponse(); |
| 236 bool allowTimingDetails = passesTimingAllowCheck(finalResponse, *securityOri
gin, info.originalTimingAllowOrigin()); | 236 bool allowTimingDetails = passesTimingAllowCheck(finalResponse, *securityOri
gin, info.originalTimingAllowOrigin()); |
| 237 double startTime = info.initialTime(); | 237 double startTime = info.initialTime(); |
| 238 | 238 |
| 239 if (info.redirectChain().isEmpty()) { | 239 if (info.redirectChain().isEmpty()) { |
| 240 PerformanceEntry* entry = PerformanceResourceTiming::create(info, timeOr
igin(), startTime, allowTimingDetails); | 240 PerformanceEntry* entry = PerformanceResourceTiming::create(info, timeOr
igin(), startTime, allowTimingDetails); |
| 241 notifyObserversOfEntry(*entry); | 241 notifyObserversOfEntry(*entry); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 visitor->trace(m_frameTimingBuffer); | 442 visitor->trace(m_frameTimingBuffer); |
| 443 visitor->trace(m_resourceTimingBuffer); | 443 visitor->trace(m_resourceTimingBuffer); |
| 444 visitor->trace(m_userTiming); | 444 visitor->trace(m_userTiming); |
| 445 visitor->trace(m_observers); | 445 visitor->trace(m_observers); |
| 446 visitor->trace(m_activeObservers); | 446 visitor->trace(m_activeObservers); |
| 447 visitor->trace(m_suspendedObservers); | 447 visitor->trace(m_suspendedObservers); |
| 448 RefCountedGarbageCollectedEventTargetWithInlineData<PerformanceBase>::trace(
visitor); | 448 RefCountedGarbageCollectedEventTargetWithInlineData<PerformanceBase>::trace(
visitor); |
| 449 } | 449 } |
| 450 | 450 |
| 451 } // namespace blink | 451 } // namespace blink |
| OLD | NEW |