diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 9 | ||||
-rw-r--r-- | chrome/common/url_constants.cc | 1 | ||||
-rw-r--r-- | chrome/common/url_constants.h | 1 |
3 files changed, 11 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"; diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index 031a13d..f746cd0 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc @@ -10,6 +10,7 @@ namespace chrome { const char kAboutScheme[] = "about"; +const char kBlobScheme[] = "blob"; const char kChromeInternalScheme[] = "chrome-internal"; const char kChromeUIScheme[] = "chrome"; const char kDataScheme[] = "data"; diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index bb726fe..579441c 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -12,6 +12,7 @@ namespace chrome { // Canonical schemes you can use as input to GURL.SchemeIs(). extern const char kAboutScheme[]; +extern const char kBlobScheme[]; extern const char kChromeInternalScheme[]; extern const char kChromeUIScheme[]; // The scheme used for DOMUIs. extern const char kCrosScheme[]; // The scheme used for ChromeOS. |