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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2319483002: Turn off isLinkPreload() when used (Closed)
Patch Set: Fixed tests Created 4 years, 3 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
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 case Reload: 467 case Reload:
468 memoryCache()->remove(resource); 468 memoryCache()->remove(resource);
469 // Fall through 469 // Fall through
470 case Load: 470 case Load:
471 resource = createResourceForLoading(request, request.charset(), factory) ; 471 resource = createResourceForLoading(request, request.charset(), factory) ;
472 break; 472 break;
473 case Revalidate: 473 case Revalidate:
474 initializeRevalidation(request.mutableResourceRequest(), resource); 474 initializeRevalidation(request.mutableResourceRequest(), resource);
475 break; 475 break;
476 case Use: 476 case Use:
477 if (resource->isLinkPreload() && !request.isLinkPreload())
478 resource->setLinkPreload(false);
477 memoryCache()->updateForAccess(resource); 479 memoryCache()->updateForAccess(resource);
478 break; 480 break;
479 } 481 }
480 482
481 if (!resource) 483 if (!resource)
482 return nullptr; 484 return nullptr;
483 if (resource->getType() != factory.type()) { 485 if (resource->getType() != factory.type()) {
484 ASSERT(request.forPreload()); 486 ASSERT(request.forPreload());
485 return nullptr; 487 return nullptr;
486 } 488 }
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 visitor->trace(m_context); 1325 visitor->trace(m_context);
1324 visitor->trace(m_archive); 1326 visitor->trace(m_archive);
1325 visitor->trace(m_loaders); 1327 visitor->trace(m_loaders);
1326 visitor->trace(m_nonBlockingLoaders); 1328 visitor->trace(m_nonBlockingLoaders);
1327 visitor->trace(m_documentResources); 1329 visitor->trace(m_documentResources);
1328 visitor->trace(m_preloads); 1330 visitor->trace(m_preloads);
1329 visitor->trace(m_resourceTimingInfoMap); 1331 visitor->trace(m_resourceTimingInfoMap);
1330 } 1332 }
1331 1333
1332 } // namespace blink 1334 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698