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

Unified Diff: net/base/upload_data.h

Issue 9569035: Ensure blobs and associated temp/shareable files survive URLRequest uploads. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | webkit/blob/blob_storage_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_data.h
===================================================================
--- net/base/upload_data.h (revision 124555)
+++ net/base/upload_data.h (working copy)
@@ -13,6 +13,7 @@
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
+#include "base/supports_user_data.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_export.h"
@@ -32,7 +33,16 @@
virtual ~ChunkCallback() {}
};
-class NET_EXPORT UploadData : public base::RefCounted<UploadData> {
+//-----------------------------------------------------------------------------
+// A very concrete class representing the data to be uploaded as part of a
+// URLRequest.
+//
+// Until there is a more abstract class for this, this one derives from
+// SupportsUserData to allow users to stash random data by
+// key and ensure it's destruction when UploadData is finally deleted.
+class NET_EXPORT UploadData
+ : public base::RefCounted<UploadData>,
+ public base::SupportsUserData {
public:
enum Type {
TYPE_BYTES,
@@ -231,7 +241,7 @@
friend class base::RefCounted<UploadData>;
- ~UploadData();
+ virtual ~UploadData();
std::vector<Element> elements_;
int64 identifier_;
« no previous file with comments | « no previous file | webkit/blob/blob_storage_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698