void InspectorApplicationCacheAgent::getManifestForFrame(ErrorString* errorString, const String& frameId, String* manifestURL)
{
    DocumentLoader* documentLoader = assertFrameWithDocumentLoader(errorString, frameId);
    if (!documentLoader)
        return;

    ApplicationCacheHost::CacheInfo info = documentLoader->applicationCacheHost()->applicationCacheInfo();
    *manifestURL = info.m_manifest.string();
}
Response InspectorApplicationCacheAgent::getManifestForFrame(
    const String& frameId,
    String* manifestURL) {
  DocumentLoader* documentLoader = nullptr;
  Response response = assertFrameWithDocumentLoader(frameId, documentLoader);
  if (!response.isSuccess())
    return response;

  ApplicationCacheHost::CacheInfo info =
      documentLoader->applicationCacheHost()->applicationCacheInfo();
  *manifestURL = info.m_manifest.getString();
  return Response::OK();
}
void InspectorApplicationCacheAgent::getApplicationCacheForFrame(ErrorString* errorString, const String& frameId, RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>& applicationCache)
{
    DocumentLoader* documentLoader = assertFrameWithDocumentLoader(errorString, frameId);
    if (!documentLoader)
        return;

    ApplicationCacheHost* host = documentLoader->applicationCacheHost();
    ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo();

    ApplicationCacheHost::ResourceInfoList resources;
    host->fillResourceList(&resources);

    applicationCache = buildObjectForApplicationCache(resources, info);
}
Response InspectorApplicationCacheAgent::getApplicationCacheForFrame(
    const String& frameId,
    std::unique_ptr<protocol::ApplicationCache::ApplicationCache>*
        applicationCache) {
  DocumentLoader* documentLoader = nullptr;
  Response response = assertFrameWithDocumentLoader(frameId, documentLoader);
  if (!response.isSuccess())
    return response;

  ApplicationCacheHost* host = documentLoader->applicationCacheHost();
  ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo();

  ApplicationCacheHost::ResourceInfoList resources;
  host->fillResourceList(&resources);

  *applicationCache = buildObjectForApplicationCache(resources, info);
  return Response::OK();
}