| 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) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 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 13 matching lines...) Expand all Loading... |
| 24 #include "core/fetch/Resource.h" | 24 #include "core/fetch/Resource.h" |
| 25 | 25 |
| 26 #include "core/fetch/CachedMetadata.h" | 26 #include "core/fetch/CachedMetadata.h" |
| 27 #include "core/fetch/CrossOriginAccessControl.h" | 27 #include "core/fetch/CrossOriginAccessControl.h" |
| 28 #include "core/fetch/FetchInitiatorTypeNames.h" | 28 #include "core/fetch/FetchInitiatorTypeNames.h" |
| 29 #include "core/fetch/MemoryCache.h" | 29 #include "core/fetch/MemoryCache.h" |
| 30 #include "core/fetch/ResourceClient.h" | 30 #include "core/fetch/ResourceClient.h" |
| 31 #include "core/fetch/ResourceClientOrObserverWalker.h" | 31 #include "core/fetch/ResourceClientOrObserverWalker.h" |
| 32 #include "core/fetch/ResourceFetcher.h" | 32 #include "core/fetch/ResourceFetcher.h" |
| 33 #include "core/fetch/ResourceLoader.h" | 33 #include "core/fetch/ResourceLoader.h" |
| 34 #include "core/inspector/InspectorInstrumentation.h" | |
| 35 #include "core/inspector/InstanceCounters.h" | 34 #include "core/inspector/InstanceCounters.h" |
| 36 #include "platform/Logging.h" | 35 #include "platform/Logging.h" |
| 37 #include "platform/SharedBuffer.h" | 36 #include "platform/SharedBuffer.h" |
| 38 #include "platform/TraceEvent.h" | 37 #include "platform/TraceEvent.h" |
| 39 #include "platform/network/HTTPParsers.h" | 38 #include "platform/network/HTTPParsers.h" |
| 40 #include "platform/weborigin/KURL.h" | 39 #include "platform/weborigin/KURL.h" |
| 41 #include "public/platform/Platform.h" | 40 #include "public/platform/Platform.h" |
| 42 #include "public/platform/WebProcessMemoryDump.h" | 41 #include "public/platform/WebProcessMemoryDump.h" |
| 43 #include "public/platform/WebScheduler.h" | 42 #include "public/platform/WebScheduler.h" |
| 44 #include "public/platform/WebSecurityOrigin.h" | 43 #include "public/platform/WebSecurityOrigin.h" |
| 45 #include "wtf/CurrentTime.h" | 44 #include "wtf/CurrentTime.h" |
| 46 #include "wtf/MathExtras.h" | 45 #include "wtf/MathExtras.h" |
| 47 #include "wtf/StdLibExtras.h" | 46 #include "wtf/StdLibExtras.h" |
| 48 #include "wtf/Vector.h" | 47 #include "wtf/Vector.h" |
| 49 #include "wtf/text/CString.h" | 48 #include "wtf/text/CString.h" |
| 49 #include "wtf/text/StringBuilder.h" |
| 50 #include <algorithm> | 50 #include <algorithm> |
| 51 | 51 |
| 52 namespace blink { | 52 namespace blink { |
| 53 | 53 |
| 54 // These response headers are not copied from a revalidated response to the | 54 // These response headers are not copied from a revalidated response to the |
| 55 // cached response headers. For compatibility, this list is based on Chromium's | 55 // cached response headers. For compatibility, this list is based on Chromium's |
| 56 // net/http/http_response_headers.cc. | 56 // net/http/http_response_headers.cc. |
| 57 const char* const headersToIgnoreAfterRevalidation[] = { | 57 const char* const headersToIgnoreAfterRevalidation[] = { |
| 58 "allow", | 58 "allow", |
| 59 "connection", | 59 "connection", |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 m_cacheHandler = CachedMetadataHandlerImpl::create(this); | 320 m_cacheHandler = CachedMetadataHandlerImpl::create(this); |
| 321 } | 321 } |
| 322 | 322 |
| 323 Resource::~Resource() | 323 Resource::~Resource() |
| 324 { | 324 { |
| 325 InstanceCounters::decrementCounter(InstanceCounters::ResourceCounter); | 325 InstanceCounters::decrementCounter(InstanceCounters::ResourceCounter); |
| 326 } | 326 } |
| 327 | 327 |
| 328 void Resource::willDestroyResource() | 328 void Resource::willDestroyResource() |
| 329 { | 329 { |
| 330 InspectorInstrumentation::willDestroyResource(this); | |
| 331 willDestroyResourceInternal(); | 330 willDestroyResourceInternal(); |
| 332 } | 331 } |
| 333 | 332 |
| 334 DEFINE_TRACE(Resource) | 333 DEFINE_TRACE(Resource) |
| 335 { | 334 { |
| 336 visitor->trace(m_loader); | 335 visitor->trace(m_loader); |
| 337 visitor->trace(m_cacheHandler); | 336 visitor->trace(m_cacheHandler); |
| 338 } | 337 } |
| 339 | 338 |
| 340 void Resource::load(ResourceFetcher* fetcher) | 339 void Resource::load(ResourceFetcher* fetcher) |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 case Resource::Media: | 1129 case Resource::Media: |
| 1131 return "Media"; | 1130 return "Media"; |
| 1132 case Resource::Manifest: | 1131 case Resource::Manifest: |
| 1133 return "Manifest"; | 1132 return "Manifest"; |
| 1134 } | 1133 } |
| 1135 ASSERT_NOT_REACHED(); | 1134 ASSERT_NOT_REACHED(); |
| 1136 return "Unknown"; | 1135 return "Unknown"; |
| 1137 } | 1136 } |
| 1138 | 1137 |
| 1139 } // namespace blink | 1138 } // namespace blink |
| OLD | NEW |