| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 resource = preCacheData(request, factory, substituteData); | 384 resource = preCacheData(request, factory, substituteData); |
| 385 if (!resource) | 385 if (!resource) |
| 386 resource = memoryCache()->resourceForURL(url, getCacheIdentifier()); | 386 resource = memoryCache()->resourceForURL(url, getCacheIdentifier()); |
| 387 | 387 |
| 388 // See if we can use an existing resource from the cache. If so, we need to
move it to be load blocking. | 388 // See if we can use an existing resource from the cache. If so, we need to
move it to be load blocking. |
| 389 moveCachedNonBlockingResourceToBlocking(resource.get(), request); | 389 moveCachedNonBlockingResourceToBlocking(resource.get(), request); |
| 390 | 390 |
| 391 const RevalidationPolicy policy = determineRevalidationPolicy(factory.type()
, request, resource.get(), isStaticData); | 391 const RevalidationPolicy policy = determineRevalidationPolicy(factory.type()
, request, resource.get(), isStaticData); |
| 392 | 392 |
| 393 String histogramName = "Blink.MemoryCache.RevalidationPolicy."; | 393 String histogramName = "Blink.MemoryCache.RevalidationPolicy."; |
| 394 if (request.forPreload()) |
| 395 histogramName.append("Preload."); |
| 394 histogramName.append(Resource::resourceTypeName(factory.type())); | 396 histogramName.append(Resource::resourceTypeName(factory.type())); |
| 395 Platform::current()->histogramEnumeration(histogramName.utf8().data(), polic
y, Load + 1); | 397 Platform::current()->histogramEnumeration(histogramName.utf8().data(), polic
y, Load + 1); |
| 396 | 398 |
| 397 switch (policy) { | 399 switch (policy) { |
| 398 case Reload: | 400 case Reload: |
| 399 memoryCache()->remove(resource.get()); | 401 memoryCache()->remove(resource.get()); |
| 400 // Fall through | 402 // Fall through |
| 401 case Load: | 403 case Load: |
| 402 resource = createResourceForLoading(request, request.charset(), factory)
; | 404 resource = createResourceForLoading(request, request.charset(), factory)
; |
| 403 break; | 405 break; |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 visitor->trace(m_loaders); | 1168 visitor->trace(m_loaders); |
| 1167 visitor->trace(m_nonBlockingLoaders); | 1169 visitor->trace(m_nonBlockingLoaders); |
| 1168 #if ENABLE(OILPAN) | 1170 #if ENABLE(OILPAN) |
| 1169 visitor->trace(m_documentResources); | 1171 visitor->trace(m_documentResources); |
| 1170 visitor->trace(m_preloads); | 1172 visitor->trace(m_preloads); |
| 1171 visitor->trace(m_resourceTimingInfoMap); | 1173 visitor->trace(m_resourceTimingInfoMap); |
| 1172 #endif | 1174 #endif |
| 1173 } | 1175 } |
| 1174 | 1176 |
| 1175 } // namespace blink | 1177 } // namespace blink |
| OLD | NEW |