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