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

Side by Side Diff: net/url_request/url_request.h

Issue 6134003: Prototype of chunked transfer encoded POST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // check if the underlying file has been changed or not. The granularity of 305 // check if the underlying file has been changed or not. The granularity of
306 // the time comparison is 1 second since time_t precision is used in WebKit. 306 // the time comparison is 1 second since time_t precision is used in WebKit.
307 void AppendBytesToUpload(const char* bytes, int bytes_len); // takes a copy 307 void AppendBytesToUpload(const char* bytes, int bytes_len); // takes a copy
308 void AppendFileRangeToUpload(const FilePath& file_path, 308 void AppendFileRangeToUpload(const FilePath& file_path,
309 uint64 offset, uint64 length, 309 uint64 offset, uint64 length,
310 const base::Time& expected_modification_time); 310 const base::Time& expected_modification_time);
311 void AppendFileToUpload(const FilePath& file_path) { 311 void AppendFileToUpload(const FilePath& file_path) {
312 AppendFileRangeToUpload(file_path, 0, kuint64max, base::Time()); 312 AppendFileRangeToUpload(file_path, 0, kuint64max, base::Time());
313 } 313 }
314 314
315 // Indicates that the request body should be sent using Chunked-Transfer
wtc 2011/01/20 00:29:47 Nit: Chunked-Transfer => chunked transfer This co
willchan no longer on Chromium 2011/01/20 08:51:04 Push back if you feel I'm being unreasonable. I ju
Satish 2011/01/20 18:02:36 I'm happy to make this change. @wtc, @vandebo - ar
vandebo (ex-Chrome) 2011/01/20 20:48:45 Feel free to make any changes that you and Will ag
316 // encoding. This method may only be called before Start() is called.
317 void EnableChunkedUpload();
318
319 // Appends the given bytes to the requests's upload data to be sent
wtc 2011/01/20 00:29:47 Nit: requests's => request's
320 // immediately via chunked-transfer encoding. When all data has been sent,
321 // call MarkEndOfChunks() to indicate the end of stream.
wtc 2011/01/20 00:29:47 Nit: end of stream => end of upload data
322 //
323 // This method may be called only after calling EnableChunkedUpload() and
324 // Start().
325 void AppendChunkToUpload(const char* bytes, int bytes_len);
326
327 // Indicates the end of a chunked-transfer encoded request body.
328 void MarkEndOfChunks();
329
315 // Set the upload data directly. 330 // Set the upload data directly.
316 void set_upload(net::UploadData* upload); 331 void set_upload(net::UploadData* upload);
317 332
318 // Get the upload data directly. 333 // Get the upload data directly.
319 net::UploadData* get_upload(); 334 net::UploadData* get_upload();
320 335
321 // Returns true if the request has a non-empty message body to upload. 336 // Returns true if the request has a non-empty message body to upload.
322 bool has_upload() const; 337 bool has_upload() const;
323 338
324 // Set an extra request header by ID or name. These methods may only be 339 // Set an extra request header by ID or name. These methods may only be
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 net::RequestPriority priority_; 654 net::RequestPriority priority_;
640 655
641 base::debug::LeakTracker<URLRequest> leak_tracker_; 656 base::debug::LeakTracker<URLRequest> leak_tracker_;
642 657
643 DISALLOW_COPY_AND_ASSIGN(URLRequest); 658 DISALLOW_COPY_AND_ASSIGN(URLRequest);
644 }; 659 };
645 660
646 } // namespace net 661 } // namespace net
647 662
648 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 663 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698