| 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) 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/fetch/ResourceFetcher.h" | 27 #include "core/fetch/ResourceFetcher.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/V8DOMActivityLogger.h" | 29 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 30 #include "core/fetch/CrossOriginAccessControl.h" | 30 #include "core/fetch/CrossOriginAccessControl.h" |
| 31 #include "core/fetch/FetchContext.h" | 31 #include "core/fetch/FetchContext.h" |
| 32 #include "core/fetch/FetchInitiatorTypeNames.h" | 32 #include "core/fetch/FetchInitiatorTypeNames.h" |
| 33 #include "core/fetch/MemoryCache.h" | 33 #include "core/fetch/MemoryCache.h" |
| 34 #include "core/fetch/ResourceLoader.h" | 34 #include "core/fetch/ResourceLoader.h" |
| 35 #include "core/fetch/ResourceLoaderSet.h" | 35 #include "core/fetch/ResourceLoaderSet.h" |
| 36 #include "core/fetch/UniqueIdentifier.h" | 36 #include "core/fetch/UniqueIdentifier.h" |
| 37 #include "platform/Histogram.h" |
| 37 #include "platform/Logging.h" | 38 #include "platform/Logging.h" |
| 38 #include "platform/RuntimeEnabledFeatures.h" | 39 #include "platform/RuntimeEnabledFeatures.h" |
| 39 #include "platform/TraceEvent.h" | 40 #include "platform/TraceEvent.h" |
| 40 #include "platform/TracedValue.h" | 41 #include "platform/TracedValue.h" |
| 41 #include "platform/mhtml/ArchiveResource.h" | 42 #include "platform/mhtml/ArchiveResource.h" |
| 42 #include "platform/mhtml/MHTMLArchive.h" | 43 #include "platform/mhtml/MHTMLArchive.h" |
| 43 #include "platform/network/ResourceTimingInfo.h" | 44 #include "platform/network/ResourceTimingInfo.h" |
| 44 #include "platform/weborigin/KnownPorts.h" | 45 #include "platform/weborigin/KnownPorts.h" |
| 45 #include "platform/weborigin/SecurityOrigin.h" | 46 #include "platform/weborigin/SecurityOrigin.h" |
| 46 #include "platform/weborigin/SecurityPolicy.h" | 47 #include "platform/weborigin/SecurityPolicy.h" |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 | 1132 |
| 1132 ResourceFetcher::DeadResourceStatsRecorder::DeadResourceStatsRecorder() | 1133 ResourceFetcher::DeadResourceStatsRecorder::DeadResourceStatsRecorder() |
| 1133 : m_useCount(0) | 1134 : m_useCount(0) |
| 1134 , m_revalidateCount(0) | 1135 , m_revalidateCount(0) |
| 1135 , m_loadCount(0) | 1136 , m_loadCount(0) |
| 1136 { | 1137 { |
| 1137 } | 1138 } |
| 1138 | 1139 |
| 1139 ResourceFetcher::DeadResourceStatsRecorder::~DeadResourceStatsRecorder() | 1140 ResourceFetcher::DeadResourceStatsRecorder::~DeadResourceStatsRecorder() |
| 1140 { | 1141 { |
| 1141 Platform::current()->histogramCustomCounts( | 1142 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, hitCountHistogram, new
CustomCountHistogram("WebCore.ResourceFetcher.HitCount", 0, 1000, 50)); |
| 1142 "WebCore.ResourceFetcher.HitCount", m_useCount, 0, 1000, 50); | 1143 hitCountHistogram.count(m_useCount); |
| 1143 Platform::current()->histogramCustomCounts( | 1144 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, revalidateCountHistogr
am, new CustomCountHistogram("WebCore.ResourceFetcher.RevalidateCount", 0, 1000,
50)); |
| 1144 "WebCore.ResourceFetcher.RevalidateCount", m_revalidateCount, 0, 1000, 5
0); | 1145 revalidateCountHistogram.count(m_revalidateCount); |
| 1145 Platform::current()->histogramCustomCounts( | 1146 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, loadCountHistogram, ne
w CustomCountHistogram("WebCore.ResourceFetcher.LoadCount", 0, 1000, 50)); |
| 1146 "WebCore.ResourceFetcher.LoadCount", m_loadCount, 0, 1000, 50); | 1147 loadCountHistogram.count(m_loadCount); |
| 1147 } | 1148 } |
| 1148 | 1149 |
| 1149 void ResourceFetcher::DeadResourceStatsRecorder::update(RevalidationPolicy polic
y) | 1150 void ResourceFetcher::DeadResourceStatsRecorder::update(RevalidationPolicy polic
y) |
| 1150 { | 1151 { |
| 1151 switch (policy) { | 1152 switch (policy) { |
| 1152 case Reload: | 1153 case Reload: |
| 1153 case Load: | 1154 case Load: |
| 1154 ++m_loadCount; | 1155 ++m_loadCount; |
| 1155 return; | 1156 return; |
| 1156 case Revalidate: | 1157 case Revalidate: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1169 visitor->trace(m_loaders); | 1170 visitor->trace(m_loaders); |
| 1170 visitor->trace(m_nonBlockingLoaders); | 1171 visitor->trace(m_nonBlockingLoaders); |
| 1171 #if ENABLE(OILPAN) | 1172 #if ENABLE(OILPAN) |
| 1172 visitor->trace(m_documentResources); | 1173 visitor->trace(m_documentResources); |
| 1173 visitor->trace(m_preloads); | 1174 visitor->trace(m_preloads); |
| 1174 visitor->trace(m_resourceTimingInfoMap); | 1175 visitor->trace(m_resourceTimingInfoMap); |
| 1175 #endif | 1176 #endif |
| 1176 } | 1177 } |
| 1177 | 1178 |
| 1178 } // namespace blink | 1179 } // namespace blink |
| OLD | NEW |