| 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
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va
lidatedURLs.contains(request.resourceRequest().url())) { | 688 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va
lidatedURLs.contains(request.resourceRequest().url())) { |
| 689 // Resources loaded from memory cache should be reported the first time
they're used. | 689 // Resources loaded from memory cache should be reported the first time
they're used. |
| 690 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt
ions().initiatorInfo.name, monotonicallyIncreasingTime()); | 690 RefPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt
ions().initiatorInfo.name, monotonicallyIncreasingTime()); |
| 691 populateResourceTiming(info.get(), resource, true); | 691 populateResourceTiming(info.get(), resource, true); |
| 692 m_scheduledResourceTimingReports.add(info, resource->type() == Resource:
:MainResource); | 692 m_scheduledResourceTimingReports.add(info, resource->type() == Resource:
:MainResource); |
| 693 if (!m_resourceTimingReportTimer.isActive()) | 693 if (!m_resourceTimingReportTimer.isActive()) |
| 694 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); | 694 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); |
| 695 } | 695 } |
| 696 | 696 |
| 697 if (m_validatedURLsRingBuffer.size() >= 10000) { |
| 698 m_validatedURLs.remove(m_validatedURLsRingBuffer.takeFirst()); |
| 699 } |
| 697 m_validatedURLs.add(request.resourceRequest().url()); | 700 m_validatedURLs.add(request.resourceRequest().url()); |
| 701 m_validatedURLsRingBuffer.append(request.resourceRequest().url()); |
| 698 } | 702 } |
| 699 | 703 |
| 700 ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc
hRequest& request) | 704 ResourcePtr<Resource> ResourceFetcher::requestResource(Resource::Type type, Fetc
hRequest& request) |
| 701 { | 705 { |
| 702 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || type
== Resource::Raw); | 706 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || type
== Resource::Raw); |
| 703 | 707 |
| 704 TRACE_EVENT0("blink", "ResourceFetcher::requestResource"); | 708 TRACE_EVENT0("blink", "ResourceFetcher::requestResource"); |
| 705 | 709 |
| 706 KURL url = request.resourceRequest().url(); | 710 KURL url = request.resourceRequest().url(); |
| 707 | 711 |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 | 1569 |
| 1566 void ResourceFetcher::trace(Visitor* visitor) | 1570 void ResourceFetcher::trace(Visitor* visitor) |
| 1567 { | 1571 { |
| 1568 visitor->trace(m_document); | 1572 visitor->trace(m_document); |
| 1569 visitor->trace(m_loaders); | 1573 visitor->trace(m_loaders); |
| 1570 visitor->trace(m_multipartLoaders); | 1574 visitor->trace(m_multipartLoaders); |
| 1571 ResourceLoaderHost::trace(visitor); | 1575 ResourceLoaderHost::trace(visitor); |
| 1572 } | 1576 } |
| 1573 | 1577 |
| 1574 } | 1578 } |
| OLD | NEW |