| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 ApplicationCacheHost::CacheInfo ApplicationCacheHost::applicationCacheInfo() { | 227 ApplicationCacheHost::CacheInfo ApplicationCacheHost::applicationCacheInfo() { |
| 228 if (!m_host) | 228 if (!m_host) |
| 229 return CacheInfo(KURL(), 0, 0, 0); | 229 return CacheInfo(KURL(), 0, 0, 0); |
| 230 | 230 |
| 231 WebApplicationCacheHost::CacheInfo webInfo; | 231 WebApplicationCacheHost::CacheInfo webInfo; |
| 232 m_host->getAssociatedCacheInfo(&webInfo); | 232 m_host->getAssociatedCacheInfo(&webInfo); |
| 233 return CacheInfo(webInfo.manifestURL, webInfo.creationTime, | 233 return CacheInfo(webInfo.manifestURL, webInfo.creationTime, |
| 234 webInfo.updateTime, webInfo.totalSize); | 234 webInfo.updateTime, webInfo.totalSize); |
| 235 } | 235 } |
| 236 | 236 |
| 237 int ApplicationCacheHost::getHostID() const { |
| 238 if (!m_host) |
| 239 return 0; |
| 240 return m_host->getHostID(); |
| 241 } |
| 242 |
| 237 void ApplicationCacheHost::fillResourceList(ResourceInfoList* resources) { | 243 void ApplicationCacheHost::fillResourceList(ResourceInfoList* resources) { |
| 238 if (!m_host) | 244 if (!m_host) |
| 239 return; | 245 return; |
| 240 | 246 |
| 241 WebVector<WebApplicationCacheHost::ResourceInfo> webResources; | 247 WebVector<WebApplicationCacheHost::ResourceInfo> webResources; |
| 242 m_host->getResourceList(&webResources); | 248 m_host->getResourceList(&webResources); |
| 243 for (size_t i = 0; i < webResources.size(); ++i) { | 249 for (size_t i = 0; i < webResources.size(); ++i) { |
| 244 resources->push_back( | 250 resources->push_back( |
| 245 ResourceInfo(webResources[i].url, webResources[i].isMaster, | 251 ResourceInfo(webResources[i].url, webResources[i].isMaster, |
| 246 webResources[i].isManifest, webResources[i].isFallback, | 252 webResources[i].isManifest, webResources[i].isFallback, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 notifyApplicationCache(kErrorEvent, 0, 0, reason, url.string(), status, | 351 notifyApplicationCache(kErrorEvent, 0, 0, reason, url.string(), status, |
| 346 message); | 352 message); |
| 347 } | 353 } |
| 348 | 354 |
| 349 DEFINE_TRACE(ApplicationCacheHost) { | 355 DEFINE_TRACE(ApplicationCacheHost) { |
| 350 visitor->trace(m_domApplicationCache); | 356 visitor->trace(m_domApplicationCache); |
| 351 visitor->trace(m_documentLoader); | 357 visitor->trace(m_documentLoader); |
| 352 } | 358 } |
| 353 | 359 |
| 354 } // namespace blink | 360 } // namespace blink |
| OLD | NEW |