summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-17 00:30:01 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-17 00:30:01 +0000
commit5f76da88e6734cda22d39adb0f5e4cca27f07690 (patch)
tree86ae8917fe709fdb2d1fb91b3616930bc6755f56 /webkit
parente89e638af5f9817cb0bb8eaa82ac7e0f70a9d02e (diff)
downloadchromium_src-5f76da88e6734cda22d39adb0f5e4cca27f07690.zip
chromium_src-5f76da88e6734cda22d39adb0f5e4cca27f07690.tar.gz
chromium_src-5f76da88e6734cda22d39adb0f5e4cca27f07690.tar.bz2
Move response_data_file from ResourceResponseHead to webkit_glue::ResponseInfo
We would like to use the entry response_data_file in ResourceResponseHead (currently in chrome/browser/resource_handler.h) in chrome/renderer. So refactor the member and move it to webkit_glue::ResourceLoaderBridge::ResponsseInfo which is the base class of ResourceResponseHead. Review URL: http://codereview.chromium.org/42199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/resource_loader_bridge.cc6
-rw-r--r--webkit/glue/resource_loader_bridge.h19
2 files changed, 25 insertions, 0 deletions
diff --git a/webkit/glue/resource_loader_bridge.cc b/webkit/glue/resource_loader_bridge.cc
index 5b29fb0..266b518 100644
--- a/webkit/glue/resource_loader_bridge.cc
+++ b/webkit/glue/resource_loader_bridge.cc
@@ -12,6 +12,12 @@
namespace webkit_glue {
ResourceLoaderBridge::ResponseInfo::ResponseInfo() {
+#if defined(OS_WIN)
+ response_data_file = base::kInvalidPlatformFileValue;
+#elif defined(OS_POSIX)
+ response_data_file.fd = base::kInvalidPlatformFileValue;
+ response_data_file.auto_close = false;
+#endif
}
ResourceLoaderBridge::ResponseInfo::~ResponseInfo() {
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 482ca84..2061a3b 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -17,6 +17,11 @@
#ifndef RESOURCE_LOADER_BRIDGE_H_
#define RESOURCE_LOADER_BRIDGE_H_
+#include "build/build_config.h"
+#if defined(OS_POSIX)
+#include "base/file_descriptor_posix.h"
+#endif
+#include "base/platform_file.h"
#include "base/ref_counted.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
@@ -61,6 +66,20 @@ class ResourceLoaderBridge {
// Content length if available. -1 if not available
int64 content_length;
+
+ // A platform specific handle for a file that carries response data. This
+ // entry is used if the resource request is of type ResourceType::MEDIA and
+ // the underlying cache layer keeps the response data in a standalone file.
+#if defined(OS_POSIX)
+ // If the response data file is available, the file handle is stored in
+ // response_data_file.fd, its value is base::kInvalidPlatformFileValue
+ // otherwise.
+ base::FileDescriptor response_data_file;
+#elif defined(OS_WIN)
+ // An asynchronous file handle to the response data file, its value is
+ // base::kInvalidPlatformFileValue if the file is not available.
+ base::PlatformFile response_data_file;
+#endif
};
// See the SyncLoad method declared below. (The name of this struct is not