Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7826)

Unified Diff: chrome/common/resource_dispatcher.cc

Issue 52040: Chrome changes to support cached form submissions.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/resource_dispatcher.cc
===================================================================
--- chrome/common/resource_dispatcher.cc (revision 12361)
+++ chrome/common/resource_dispatcher.cc (working copy)
@@ -61,6 +61,7 @@
virtual void AppendDataToUpload(const char* data, int data_len);
virtual void AppendFileRangeToUpload(const std::wstring& path,
uint64 offset, uint64 length);
+ virtual void SetUploadIdentifier(int64 identifier);
virtual bool Start(Peer* peer);
virtual void Cancel();
virtual void SetDefersLoading(bool value);
@@ -147,18 +148,28 @@
if (data_len == 0)
return;
- request_.upload_content.push_back(net::UploadData::Element());
- request_.upload_content.back().SetToBytes(data, data_len);
+ if (!request_.upload_data)
+ request_.upload_data = new net::UploadData();
+ request_.upload_data->AppendBytes(data, data_len);
}
void IPCResourceLoaderBridge::AppendFileRangeToUpload(
const std::wstring& path, uint64 offset, uint64 length) {
DCHECK(request_id_ == -1) << "request already started";
- request_.upload_content.push_back(net::UploadData::Element());
- request_.upload_content.back().SetToFilePathRange(path, offset, length);
+ if (!request_.upload_data)
+ request_.upload_data = new net::UploadData();
+ request_.upload_data->AppendFileRange(path, offset, length);
}
+void IPCResourceLoaderBridge::SetUploadIdentifier(int64 identifier) {
+ DCHECK(request_id_ == -1) << "request already started";
+
+ if (!request_.upload_data)
+ request_.upload_data = new net::UploadData();
+ request_.upload_data->set_identifier(identifier);
+}
+
// Writes a footer on the message and sends it
bool IPCResourceLoaderBridge::Start(Peer* peer) {
if (request_id_ != -1) {

Powered by Google App Engine
This is Rietveld 408576698