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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 void update(RevalidationPolicy); | 201 void update(RevalidationPolicy); |
202 | 202 |
203 private: | 203 private: |
204 int m_useCount; | 204 int m_useCount; |
205 int m_revalidateCount; | 205 int m_revalidateCount; |
206 int m_loadCount; | 206 int m_loadCount; |
207 }; | 207 }; |
208 DeadResourceStatsRecorder m_deadStatsRecorder; | 208 DeadResourceStatsRecorder m_deadStatsRecorder; |
209 | 209 |
210 // 29 bits left | 210 // 28 bits left |
211 bool m_autoLoadImages : 1; | 211 bool m_autoLoadImages : 1; |
212 bool m_imagesEnabled : 1; | 212 bool m_imagesEnabled : 1; |
213 bool m_allowStaleResources : 1; | 213 bool m_allowStaleResources : 1; |
| 214 bool m_imageFetched : 1; |
214 }; | 215 }; |
215 | 216 |
216 class ResourceCacheValidationSuppressor { | 217 class ResourceCacheValidationSuppressor { |
217 WTF_MAKE_NONCOPYABLE(ResourceCacheValidationSuppressor); | 218 WTF_MAKE_NONCOPYABLE(ResourceCacheValidationSuppressor); |
218 STACK_ALLOCATED(); | 219 STACK_ALLOCATED(); |
219 public: | 220 public: |
220 ResourceCacheValidationSuppressor(ResourceFetcher* loader) | 221 ResourceCacheValidationSuppressor(ResourceFetcher* loader) |
221 : m_loader(loader) | 222 : m_loader(loader) |
222 , m_previousState(false) | 223 , m_previousState(false) |
223 { | 224 { |
224 if (m_loader) { | 225 if (m_loader) { |
225 m_previousState = m_loader->m_allowStaleResources; | 226 m_previousState = m_loader->m_allowStaleResources; |
226 m_loader->m_allowStaleResources = true; | 227 m_loader->m_allowStaleResources = true; |
227 } | 228 } |
228 } | 229 } |
229 ~ResourceCacheValidationSuppressor() | 230 ~ResourceCacheValidationSuppressor() |
230 { | 231 { |
231 if (m_loader) | 232 if (m_loader) |
232 m_loader->m_allowStaleResources = m_previousState; | 233 m_loader->m_allowStaleResources = m_previousState; |
233 } | 234 } |
234 private: | 235 private: |
235 Member<ResourceFetcher> m_loader; | 236 Member<ResourceFetcher> m_loader; |
236 bool m_previousState; | 237 bool m_previousState; |
237 }; | 238 }; |
238 | 239 |
239 } // namespace blink | 240 } // namespace blink |
240 | 241 |
241 #endif // ResourceFetcher_h | 242 #endif // ResourceFetcher_h |
OLD | NEW |