| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 rights reserved. | 6 rights reserved. |
| 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 CheckContentSecurityPolicy, DocumentContext)); | 1593 CheckContentSecurityPolicy, DocumentContext)); |
| 1594 return options; | 1594 return options; |
| 1595 } | 1595 } |
| 1596 | 1596 |
| 1597 String ResourceFetcher::getCacheIdentifier() const { | 1597 String ResourceFetcher::getCacheIdentifier() const { |
| 1598 if (context().isControlledByServiceWorker()) | 1598 if (context().isControlledByServiceWorker()) |
| 1599 return String::number(context().serviceWorkerID()); | 1599 return String::number(context().serviceWorkerID()); |
| 1600 return MemoryCache::defaultCacheIdentifier(); | 1600 return MemoryCache::defaultCacheIdentifier(); |
| 1601 } | 1601 } |
| 1602 | 1602 |
| 1603 void ResourceFetcher::emulateLoadStartedForInspector( |
| 1604 Resource* resource, |
| 1605 const KURL& url, |
| 1606 WebURLRequest::RequestContext requestContext, |
| 1607 const AtomicString& initiatorName) { |
| 1608 if (cachedResource(url)) |
| 1609 return; |
| 1610 ResourceRequest resourceRequest(url); |
| 1611 resourceRequest.setRequestContext(requestContext); |
| 1612 FetchRequest request(resourceRequest, initiatorName, resource->options()); |
| 1613 context().canRequest(resource->getType(), resource->lastResourceRequest(), |
| 1614 resource->lastResourceRequest().url(), request.options(), |
| 1615 false, request.getOriginRestriction()); |
| 1616 requestLoadStarted(resource->identifier(), resource, request, |
| 1617 ResourceLoadingFromCache); |
| 1618 } |
| 1619 |
| 1603 ResourceFetcher::DeadResourceStatsRecorder::DeadResourceStatsRecorder() | 1620 ResourceFetcher::DeadResourceStatsRecorder::DeadResourceStatsRecorder() |
| 1604 : m_useCount(0), m_revalidateCount(0), m_loadCount(0) {} | 1621 : m_useCount(0), m_revalidateCount(0), m_loadCount(0) {} |
| 1605 | 1622 |
| 1606 ResourceFetcher::DeadResourceStatsRecorder::~DeadResourceStatsRecorder() { | 1623 ResourceFetcher::DeadResourceStatsRecorder::~DeadResourceStatsRecorder() { |
| 1607 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 1624 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 1608 CustomCountHistogram, hitCountHistogram, | 1625 CustomCountHistogram, hitCountHistogram, |
| 1609 new CustomCountHistogram("WebCore.ResourceFetcher.HitCount", 0, 1000, | 1626 new CustomCountHistogram("WebCore.ResourceFetcher.HitCount", 0, 1000, |
| 1610 50)); | 1627 50)); |
| 1611 hitCountHistogram.count(m_useCount); | 1628 hitCountHistogram.count(m_useCount); |
| 1612 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 1629 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1641 visitor->trace(m_context); | 1658 visitor->trace(m_context); |
| 1642 visitor->trace(m_archive); | 1659 visitor->trace(m_archive); |
| 1643 visitor->trace(m_loaders); | 1660 visitor->trace(m_loaders); |
| 1644 visitor->trace(m_nonBlockingLoaders); | 1661 visitor->trace(m_nonBlockingLoaders); |
| 1645 visitor->trace(m_documentResources); | 1662 visitor->trace(m_documentResources); |
| 1646 visitor->trace(m_preloads); | 1663 visitor->trace(m_preloads); |
| 1647 visitor->trace(m_resourceTimingInfoMap); | 1664 visitor->trace(m_resourceTimingInfoMap); |
| 1648 } | 1665 } |
| 1649 | 1666 |
| 1650 } // namespace blink | 1667 } // namespace blink |
| OLD | NEW |