Index: content/worker/worker_webkitplatformsupport_impl.cc |
diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc |
index 3cc4c81d5bfae762265d22a7459219f18a0b7817..a6c89d7f0e7684c26cccf688c59381e2cf794451 100644 |
--- a/content/worker/worker_webkitplatformsupport_impl.cc |
+++ b/content/worker/worker_webkitplatformsupport_impl.cc |
@@ -17,6 +17,7 @@ |
#include "content/child/thread_safe_sender.h" |
#include "content/child/webblobregistry_impl.h" |
#include "content/child/webmessageportchannel_impl.h" |
+#include "content/common/appcache_messages.h" |
#include "content/common/file_utilities_messages.h" |
#include "content/common/mime_registry_messages.h" |
#include "content/worker/worker_thread.h" |
@@ -26,6 +27,7 @@ |
#include "third_party/WebKit/public/platform/WebFileInfo.h" |
#include "third_party/WebKit/public/platform/WebString.h" |
#include "third_party/WebKit/public/platform/WebURL.h" |
+#include "third_party/WebKit/public/web/WebController.h" |
#include "webkit/common/quota/quota_types.h" |
#include "webkit/glue/webfileutilities_impl.h" |
#include "webkit/glue/webkit_glue.h" |
@@ -301,4 +303,25 @@ void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota( |
QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
} |
+void WorkerWebKitPlatformSupportImpl::appcacheExeHandlerResponse( |
+ int requestId, |
+ WebKit::WebControllerResponse* webResponse) { |
+ if (!thread_safe_sender_.get()) |
+ return; |
+ |
+ appcache::AppCacheExecutableHandler::Response response; |
+ response.status_code = webResponse->statusCode; |
+ response.status_text = webResponse->statusText; |
+ response.blob_id = webResponse->blobId; |
+ response.use_default = webResponse->useDefault; // this means use the network |
+ DCHECK((response.status_code != 0) != response.use_default); // xor one or the other form of response |
+ for (std::vector<std::pair<WebString, WebString> >::const_iterator iter = webResponse->headers.begin(); |
+ iter != webResponse->headers.end(); ++iter) { |
+ response.headers[iter->first] = iter->second; |
+ } |
+ |
+ thread_safe_sender_->Send( |
+ new AppCacheHostMsg_ExeHandlerResponse(requestId, response)); |
+} |
+ |
} // namespace content |