| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "CachedRawResource.h" | 27 #include "CachedRawResource.h" |
| 28 | 28 |
| 29 #include "CachedResourceClient.h" | 29 #include "CachedResourceClient.h" |
| 30 #include "CachedResourceClientWalker.h" | 30 #include "CachedResourceClientWalker.h" |
| 31 #include "CachedResourceLoader.h" | 31 #include "CachedResourceLoader.h" |
| 32 #include "ResourceBuffer.h" | 32 #include "ResourceBuffer.h" |
| 33 #include "ResourceLoader.h" | 33 #include "SubresourceLoader.h" |
| 34 #include "WebCoreMemoryInstrumentation.h" | 34 #include "WebCoreMemoryInstrumentation.h" |
| 35 #include <wtf/PassRefPtr.h> | 35 #include <wtf/PassRefPtr.h> |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 CachedRawResource::CachedRawResource(ResourceRequest& resourceRequest, Type type
) | 39 CachedRawResource::CachedRawResource(ResourceRequest& resourceRequest, Type type
) |
| 40 : CachedResource(resourceRequest, type) | 40 : CachedResource(resourceRequest, type) |
| 41 , m_identifier(0) | 41 , m_identifier(0) |
| 42 { | 42 { |
| 43 } | 43 } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 } | 225 } |
| 226 | 226 |
| 227 for (size_t i = 0; i < m_redirectChain.size(); i++) { | 227 for (size_t i = 0; i < m_redirectChain.size(); i++) { |
| 228 if (m_redirectChain[i].m_redirectResponse.cacheControlContainsNoStore()) | 228 if (m_redirectChain[i].m_redirectResponse.cacheControlContainsNoStore()) |
| 229 return false; | 229 return false; |
| 230 } | 230 } |
| 231 | 231 |
| 232 return true; | 232 return true; |
| 233 } | 233 } |
| 234 | 234 |
| 235 SubresourceLoader* CachedRawResource::loader() const |
| 236 { |
| 237 return m_loader.get(); |
| 238 } |
| 239 |
| 235 void CachedRawResource::clear() | 240 void CachedRawResource::clear() |
| 236 { | 241 { |
| 237 m_data.clear(); | 242 m_data.clear(); |
| 238 setEncodedSize(0); | 243 setEncodedSize(0); |
| 239 if (m_loader) | 244 if (m_loader) |
| 240 m_loader->clearResourceData(); | 245 m_loader->clearResourceData(); |
| 241 } | 246 } |
| 242 | 247 |
| 243 void CachedRawResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co
nst | 248 void CachedRawResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co
nst |
| 244 { | 249 { |
| 245 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceRaw); | 250 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceRaw); |
| 246 CachedResource::reportMemoryUsage(memoryObjectInfo); | 251 CachedResource::reportMemoryUsage(memoryObjectInfo); |
| 247 } | 252 } |
| 248 | 253 |
| 249 | 254 |
| 250 } // namespace WebCore | 255 } // namespace WebCore |
| OLD | NEW |