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 | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
5 rights reserved. | 5 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 static void determineRequestContext(ResourceRequest&, | 159 static void determineRequestContext(ResourceRequest&, |
160 Resource::Type, | 160 Resource::Type, |
161 bool isMainFrame); | 161 bool isMainFrame); |
162 void determineRequestContext(ResourceRequest&, Resource::Type); | 162 void determineRequestContext(ResourceRequest&, Resource::Type); |
163 | 163 |
164 void updateAllImageResourcePriorities(); | 164 void updateAllImageResourcePriorities(); |
165 | 165 |
166 void reloadLoFiImages(); | 166 void reloadLoFiImages(); |
167 | 167 |
| 168 ResourceTimingInfo* getMainResourceTimingInfo(unsigned long identifier); |
| 169 |
168 // This is only exposed for testing purposes. | 170 // This is only exposed for testing purposes. |
169 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } | 171 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } |
170 | 172 |
171 private: | 173 private: |
172 friend class ResourceCacheValidationSuppressor; | 174 friend class ResourceCacheValidationSuppressor; |
173 | 175 |
174 explicit ResourceFetcher(FetchContext*); | 176 explicit ResourceFetcher(FetchContext*); |
175 | 177 |
176 void initializeRevalidation(ResourceRequest&, Resource*); | 178 void initializeRevalidation(ResourceRequest&, Resource*); |
177 Resource* createResourceForLoading(FetchRequest&, | 179 Resource* createResourceForLoading(FetchRequest&, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 230 |
229 Member<HeapListHashSet<Member<Resource>>> m_preloads; | 231 Member<HeapListHashSet<Member<Resource>>> m_preloads; |
230 Member<MHTMLArchive> m_archive; | 232 Member<MHTMLArchive> m_archive; |
231 | 233 |
232 Timer<ResourceFetcher> m_resourceTimingReportTimer; | 234 Timer<ResourceFetcher> m_resourceTimingReportTimer; |
233 | 235 |
234 using ResourceTimingInfoMap = | 236 using ResourceTimingInfoMap = |
235 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; | 237 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; |
236 ResourceTimingInfoMap m_resourceTimingInfoMap; | 238 ResourceTimingInfoMap m_resourceTimingInfoMap; |
237 | 239 |
| 240 // Find out whether a map is an overkill in here, crbugs/669300. |
| 241 using MainResourceTimingInfoMap = |
| 242 HashMap<unsigned long, std::unique_ptr<ResourceTimingInfo>>; |
| 243 MainResourceTimingInfoMap m_mainResourceTimingInfoMap; |
| 244 |
238 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; | 245 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; |
239 | 246 |
240 HeapHashSet<Member<ResourceLoader>> m_loaders; | 247 HeapHashSet<Member<ResourceLoader>> m_loaders; |
241 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; | 248 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; |
242 | 249 |
243 // Used in hit rate histograms. | 250 // Used in hit rate histograms. |
244 class DeadResourceStatsRecorder { | 251 class DeadResourceStatsRecorder { |
245 DISALLOW_NEW(); | 252 DISALLOW_NEW(); |
246 | 253 |
247 public: | 254 public: |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 291 } |
285 | 292 |
286 private: | 293 private: |
287 Member<ResourceFetcher> m_loader; | 294 Member<ResourceFetcher> m_loader; |
288 bool m_previousState; | 295 bool m_previousState; |
289 }; | 296 }; |
290 | 297 |
291 } // namespace blink | 298 } // namespace blink |
292 | 299 |
293 #endif // ResourceFetcher_h | 300 #endif // ResourceFetcher_h |
OLD | NEW |