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

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

Issue 148323002: Add histograms to ResourceFetcher to evaluate memory cache hit rate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@histogram-unload-frequency
Patch Set: Created 6 years, 10 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 Timer<ResourceFetcher> m_resourceTimingReportTimer; 219 Timer<ResourceFetcher> m_resourceTimingReportTimer;
220 220
221 typedef HashMap<Resource*, RefPtr<ResourceTimingInfo> > ResourceTimingInfoMa p; 221 typedef HashMap<Resource*, RefPtr<ResourceTimingInfo> > ResourceTimingInfoMa p;
222 ResourceTimingInfoMap m_resourceTimingInfoMap; 222 ResourceTimingInfoMap m_resourceTimingInfoMap;
223 223
224 HashMap<RefPtr<ResourceTimingInfo>, bool> m_scheduledResourceTimingReports; 224 HashMap<RefPtr<ResourceTimingInfo>, bool> m_scheduledResourceTimingReports;
225 225
226 OwnPtr<ResourceLoaderSet> m_loaders; 226 OwnPtr<ResourceLoaderSet> m_loaders;
227 OwnPtr<ResourceLoaderSet> m_multipartLoaders; 227 OwnPtr<ResourceLoaderSet> m_multipartLoaders;
228 228
229 // Used in hit rate histograms.
230 int m_useCount;
231 int m_revalidateCount;
232 int m_loadCount;
233
229 // 29 bits left 234 // 29 bits left
230 bool m_autoLoadImages : 1; 235 bool m_autoLoadImages : 1;
231 bool m_imagesEnabled : 1; 236 bool m_imagesEnabled : 1;
232 bool m_allowStaleResources : 1; 237 bool m_allowStaleResources : 1;
233 }; 238 };
234 239
235 class ResourceCacheValidationSuppressor { 240 class ResourceCacheValidationSuppressor {
236 WTF_MAKE_NONCOPYABLE(ResourceCacheValidationSuppressor); 241 WTF_MAKE_NONCOPYABLE(ResourceCacheValidationSuppressor);
237 WTF_MAKE_FAST_ALLOCATED; 242 WTF_MAKE_FAST_ALLOCATED;
238 public: 243 public:
(...skipping 12 matching lines...) Expand all
251 m_loader->m_allowStaleResources = m_previousState; 256 m_loader->m_allowStaleResources = m_previousState;
252 } 257 }
253 private: 258 private:
254 ResourceFetcher* m_loader; 259 ResourceFetcher* m_loader;
255 bool m_previousState; 260 bool m_previousState;
256 }; 261 };
257 262
258 } // namespace WebCore 263 } // namespace WebCore
259 264
260 #endif 265 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/fetch/ResourceFetcher.cpp » ('j') | Source/core/fetch/ResourceFetcher.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698