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) 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 24 matching lines...) Expand all Loading... |
35 #include "core/fetch/ResourceLoaderOptions.h" | 35 #include "core/fetch/ResourceLoaderOptions.h" |
36 #include "core/fetch/ResourceLoaderSet.h" | 36 #include "core/fetch/ResourceLoaderSet.h" |
37 #include "core/fetch/SubstituteData.h" | 37 #include "core/fetch/SubstituteData.h" |
38 #include "platform/Timer.h" | 38 #include "platform/Timer.h" |
39 #include "platform/network/ResourceError.h" | 39 #include "platform/network/ResourceError.h" |
40 #include "platform/network/ResourceLoadPriority.h" | 40 #include "platform/network/ResourceLoadPriority.h" |
41 #include "wtf/HashMap.h" | 41 #include "wtf/HashMap.h" |
42 #include "wtf/HashSet.h" | 42 #include "wtf/HashSet.h" |
43 #include "wtf/ListHashSet.h" | 43 #include "wtf/ListHashSet.h" |
44 #include "wtf/text/StringHash.h" | 44 #include "wtf/text/StringHash.h" |
45 #include <memory> | |
46 | 45 |
47 namespace blink { | 46 namespace blink { |
48 | 47 |
49 class ArchiveResource; | 48 class ArchiveResource; |
50 class CSSStyleSheetResource; | 49 class CSSStyleSheetResource; |
51 class DocumentResource; | 50 class DocumentResource; |
52 class FontResource; | 51 class FontResource; |
53 class ImageResource; | 52 class ImageResource; |
54 class MHTMLArchive; | 53 class MHTMLArchive; |
55 class RawResource; | 54 class RawResource; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 Member<FetchContext> m_context; | 182 Member<FetchContext> m_context; |
184 | 183 |
185 HashSet<String> m_validatedURLs; | 184 HashSet<String> m_validatedURLs; |
186 mutable DocumentResourceMap m_documentResources; | 185 mutable DocumentResourceMap m_documentResources; |
187 | 186 |
188 Member<HeapListHashSet<Member<Resource>>> m_preloads; | 187 Member<HeapListHashSet<Member<Resource>>> m_preloads; |
189 Member<MHTMLArchive> m_archive; | 188 Member<MHTMLArchive> m_archive; |
190 | 189 |
191 Timer<ResourceFetcher> m_resourceTimingReportTimer; | 190 Timer<ResourceFetcher> m_resourceTimingReportTimer; |
192 | 191 |
193 using ResourceTimingInfoMap = HeapHashMap<Member<Resource>, std::unique_ptr<
ResourceTimingInfo>>; | 192 using ResourceTimingInfoMap = HeapHashMap<Member<Resource>, OwnPtr<ResourceT
imingInfo>>; |
194 ResourceTimingInfoMap m_resourceTimingInfoMap; | 193 ResourceTimingInfoMap m_resourceTimingInfoMap; |
195 | 194 |
196 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports
; | 195 Vector<OwnPtr<ResourceTimingInfo>> m_scheduledResourceTimingReports; |
197 | 196 |
198 ResourceLoaderSet m_loaders; | 197 ResourceLoaderSet m_loaders; |
199 ResourceLoaderSet m_nonBlockingLoaders; | 198 ResourceLoaderSet m_nonBlockingLoaders; |
200 | 199 |
201 // Used in hit rate histograms. | 200 // Used in hit rate histograms. |
202 class DeadResourceStatsRecorder { | 201 class DeadResourceStatsRecorder { |
203 DISALLOW_NEW(); | 202 DISALLOW_NEW(); |
204 public: | 203 public: |
205 DeadResourceStatsRecorder(); | 204 DeadResourceStatsRecorder(); |
206 ~DeadResourceStatsRecorder(); | 205 ~DeadResourceStatsRecorder(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 m_loader->m_allowStaleResources = m_previousState; | 239 m_loader->m_allowStaleResources = m_previousState; |
241 } | 240 } |
242 private: | 241 private: |
243 Member<ResourceFetcher> m_loader; | 242 Member<ResourceFetcher> m_loader; |
244 bool m_previousState; | 243 bool m_previousState; |
245 }; | 244 }; |
246 | 245 |
247 } // namespace blink | 246 } // namespace blink |
248 | 247 |
249 #endif // ResourceFetcher_h | 248 #endif // ResourceFetcher_h |
OLD | NEW |