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

Unified Diff: net/base/upload_data.h

Issue 10878082: net: Move file operation code from UploadData to UploadDataStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove initialization check from IsInMemory Created 8 years, 4 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: net/base/upload_data.h
diff --git a/net/base/upload_data.h b/net/base/upload_data.h
index 93131812d6a6ce782c601a824bd9c9369f7b817c..b35263cc23352b83637ce3c1a9eb4df6a49c8e6a 100644
--- a/net/base/upload_data.h
+++ b/net/base/upload_data.h
@@ -15,7 +15,6 @@
#include "net/base/upload_element.h"
class FilePath;
-class GURL;
namespace base {
class Time;
@@ -68,28 +67,6 @@ class NET_EXPORT UploadData
void set_last_chunk_appended(bool set) { last_chunk_appended_ = set; }
bool last_chunk_appended() const { return last_chunk_appended_; }
- // Gets the total size in bytes of the data to upload. Computing the
- // content length can result in performing file IO hence the operation is
- // done asynchronously. Runs the callback with the content length once the
- // computation is done.
- typedef base::Callback<void(uint64 content_length)> ContentLengthCallback;
- void GetContentLength(const ContentLengthCallback& callback);
-
- // Returns the total size in bytes of the data to upload, for testing.
- // This version may perform file IO on the current thread. This function
- // will fail if called on a thread where file IO is prohibited. Usually
- // used for testing, but Chrome Frame also uses this version.
- uint64 GetContentLengthSync();
-
- // Returns true if the upload data is entirely in memory (i.e. the
- // upload data is not chunked, and all elemnts are of TYPE_BYTES).
- bool IsInMemory() const;
-
- // Resets the offset of each upload data element to zero, so that the
- // upload data can be reread. This can happen if the same upload data is
- // reused for a new UploadDataStream.
- void ResetOffset();
-
const std::vector<UploadElement>* elements() const {
return &elements_;
}
@@ -111,9 +88,6 @@ class NET_EXPORT UploadData
int64 identifier() const { return identifier_; }
private:
- // Helper function for GetContentLength().
- void DoGetContentLength(uint64* content_length);
-
friend class base::RefCounted<UploadData>;
virtual ~UploadData();

Powered by Google App Engine
This is Rietveld 408576698