diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 02:42:36 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 02:42:36 +0000 |
commit | 8107004fbfe9f7ea4be59f6620273c1206c12f42 (patch) | |
tree | f86046c0bb77f471f60d088626ad291360b356ff /chrome/common/resource_dispatcher.cc | |
parent | 766f613f1c7022941e2e182543d0208a61210a16 (diff) | |
download | chromium_src-8107004fbfe9f7ea4be59f6620273c1206c12f42.zip chromium_src-8107004fbfe9f7ea4be59f6620273c1206c12f42.tar.gz chromium_src-8107004fbfe9f7ea4be59f6620273c1206c12f42.tar.bz2 |
Support handling blob URL and resolve blob references in upload data.
BUG=none
TEST=unittest
Review URL: http://codereview.chromium.org/3282003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_dispatcher.cc')
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index a8993ed..976995e 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -60,6 +60,7 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { uint64 offset, uint64 length, const base::Time& expected_modification_time); + virtual void AppendBlobToUpload(const GURL& blob_url); virtual void SetUploadIdentifier(int64 identifier); virtual bool Start(Peer* peer); virtual void Cancel(); @@ -169,6 +170,14 @@ void IPCResourceLoaderBridge::AppendFileRangeToUpload( expected_modification_time); } +void IPCResourceLoaderBridge::AppendBlobToUpload(const GURL& blob_url) { + DCHECK(request_id_ == -1) << "request already started"; + + if (!request_.upload_data) + request_.upload_data = new net::UploadData(); + request_.upload_data->AppendBlob(blob_url); +} + void IPCResourceLoaderBridge::SetUploadIdentifier(int64 identifier) { DCHECK(request_id_ == -1) << "request already started"; |