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

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

Issue 1112513005: Reload image bypassing the cache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: japhet comments Created 5 years, 7 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
« no previous file with comments | « no previous file | Source/core/html/HTMLImageElement.h » ('j') | public/web/WebLocalFrame.h » ('J')
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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 // Certain requests (e.g., XHRs) might have manually set headers that requir e revalidation. 730 // Certain requests (e.g., XHRs) might have manually set headers that requir e revalidation.
731 // FIXME: In theory, this should be a Revalidate case. In practice, the Memo ryCache revalidation path assumes a whole bunch 731 // FIXME: In theory, this should be a Revalidate case. In practice, the Memo ryCache revalidation path assumes a whole bunch
732 // of things about how revalidation works that manual headers violate, so pu nt to Reload instead. 732 // of things about how revalidation works that manual headers violate, so pu nt to Reload instead.
733 if (request.isConditional()) 733 if (request.isConditional())
734 return Reload; 734 return Reload;
735 735
736 // Don't reload resources while pasting. 736 // Don't reload resources while pasting.
737 if (m_allowStaleResources) 737 if (m_allowStaleResources)
738 return Use; 738 return Use;
739 739
740 if (request.cachePolicy() == ResourceRequestCachePolicy::ReloadBypassingCach e)
741 return Reload;
742
740 if (!fetchRequest.options().canReuseRequest(existingResource->options())) 743 if (!fetchRequest.options().canReuseRequest(existingResource->options()))
741 return Reload; 744 return Reload;
742 745
743 // Always use preloads. 746 // Always use preloads.
744 if (existingResource->isPreloaded()) 747 if (existingResource->isPreloaded())
745 return Use; 748 return Use;
746 749
747 // CachePolicyHistoryBuffer uses the cache no matter what. 750 // CachePolicyHistoryBuffer uses the cache no matter what.
748 CachePolicy cachePolicy = context().cachePolicy(); 751 CachePolicy cachePolicy = context().cachePolicy();
749 if (cachePolicy == CachePolicyHistoryBuffer) 752 if (cachePolicy == CachePolicyHistoryBuffer)
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 ResourceLoaderHost::trace(visitor); 1301 ResourceLoaderHost::trace(visitor);
1299 } 1302 }
1300 1303
1301 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) 1304 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host)
1302 { 1305 {
1303 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); 1306 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType);
1304 return static_cast<ResourceFetcher*>(host); 1307 return static_cast<ResourceFetcher*>(host);
1305 } 1308 }
1306 1309
1307 } 1310 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLImageElement.h » ('j') | public/web/WebLocalFrame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698