diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 19:55:08 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 19:55:08 +0000 |
commit | ccf1ac4398aeb300bc3c005640aaf57500488e2d (patch) | |
tree | 35eadc64a003ec79f2fc77924f5b92928cede2d0 /webkit/glue/resource_loader_bridge.h | |
parent | 059292e77d7fcfbf930ccb8cafdaaadd7a505a2e (diff) | |
download | chromium_src-ccf1ac4398aeb300bc3c005640aaf57500488e2d.zip chromium_src-ccf1ac4398aeb300bc3c005640aaf57500488e2d.tar.gz chromium_src-ccf1ac4398aeb300bc3c005640aaf57500488e2d.tar.bz2 |
Chrome changes to support cached form submissions.
The solution is to add a user-defined identifier to UploadData.
If that identifier is set, and if the request method is POST,
then HttpCache will enable caching for the response. (The cache
key will be a composition of the identifier and the URL.) A
subsequent POST request to the same URL with the same identifier
will "hit" the previously generated cache entry. Reuse from the
cache is subject to all of the standard rules.
For reference, here are the corresponding net changes:
http://codereview.chromium.org/52028
Here are the corresponding WebKit changes:
http://trac.webkit.org/changeset/41919
BUG=2636
R=sky
Review URL: http://codereview.chromium.org/52040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/resource_loader_bridge.h')
-rw-r--r-- | webkit/glue/resource_loader_bridge.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h index 161c237..0740f54 100644 --- a/webkit/glue/resource_loader_bridge.h +++ b/webkit/glue/resource_loader_bridge.h @@ -200,6 +200,11 @@ class ResourceLoaderBridge { virtual void AppendFileRangeToUpload(const std::wstring& file_path, uint64 offset, uint64 length) = 0; + // Call this method before calling Start() to assign an upload identifier to + // this request. This is used to enable caching of POST responses. A value + // of 0 implies the unspecified identifier. + virtual void SetUploadIdentifier(int64 identifier) = 0; + // Call this method to initiate the request. If this method succeeds, then // the peer's methods will be called asynchronously to report various events. virtual bool Start(Peer* peer) = 0; |