Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: Source/core/loader/cache/CachedResourceLoader.cpp

Issue 15697017: Move subresource archive loading out of ResourceLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/archive/ArchiveResource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 resource->setLoadPriority(request.priority()); 392 resource->setLoadPriority(request.priority());
393 393
394 if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest:: NoDefer == request.defer()) { 394 if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest:: NoDefer == request.defer()) {
395 if (!frame()) 395 if (!frame())
396 return 0; 396 return 0;
397 397
398 FrameLoader* frameLoader = frame()->loader(); 398 FrameLoader* frameLoader = frame()->loader();
399 if (request.options().securityCheck == DoSecurityCheck && (frameLoader-> state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || fram eLoader->activeDocumentLoader()->isStopping())) 399 if (request.options().securityCheck == DoSecurityCheck && (frameLoader-> state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || fram eLoader->activeDocumentLoader()->isStopping()))
400 return 0; 400 return 0;
401 401
402 resource->load(this, request.options()); 402 if (!m_documentLoader->scheduleArchiveLoad(resource.get(), request.resou rceRequest()))
403 resource->load(this, request.options());
403 404
404 // We don't support immediate loads, but we do support immediate failure . 405 // We don't support immediate loads, but we do support immediate failure .
405 if (resource->errorOccurred()) { 406 if (resource->errorOccurred()) {
406 if (resource->inCache()) 407 if (resource->inCache())
407 memoryCache()->remove(resource.get()); 408 memoryCache()->remove(resource.get());
408 return 0; 409 return 0;
409 } 410 }
410 } 411 }
411 412
412 // FIXME: Temporarily leave main resource caching disabled for chromium, see https://bugs.webkit.org/show_bug.cgi?id=107962 413 // FIXME: Temporarily leave main resource caching disabled for chromium, see https://bugs.webkit.org/show_bug.cgi?id=107962
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume ntResourcesTimer"); 976 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume ntResourcesTimer");
976 } 977 }
977 978
978 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( ) 979 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( )
979 { 980 {
980 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre dentials, DoSecurityCheck, CheckContentSecurityPolicy); 981 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre dentials, DoSecurityCheck, CheckContentSecurityPolicy);
981 return options; 982 return options;
982 } 983 }
983 984
984 } 985 }
OLDNEW
« no previous file with comments | « Source/core/loader/archive/ArchiveResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698