diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 00:43:14 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 00:43:14 +0000 |
commit | 1dfff5c058db41e3b2caa74159ee7ed458bc9d69 (patch) | |
tree | 3c4f296904a28868860729aa35ae38234874657a /webkit/blob/blob_data.h | |
parent | c36a9b69927d60cd846e6c60a9a87a1edc650df7 (diff) | |
download | chromium_src-1dfff5c058db41e3b2caa74159ee7ed458bc9d69.zip chromium_src-1dfff5c058db41e3b2caa74159ee7ed458bc9d69.tar.gz chromium_src-1dfff5c058db41e3b2caa74159ee7ed458bc9d69.tar.bz2 |
Add deletable file refs to Blobs
BUG=52486
TEST=manual
Review URL: http://codereview.chromium.org/3582002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob/blob_data.h')
-rw-r--r-- | webkit/blob/blob_data.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/webkit/blob/blob_data.h b/webkit/blob/blob_data.h index ddd0e65..3be694f 100644 --- a/webkit/blob/blob_data.h +++ b/webkit/blob/blob_data.h @@ -12,6 +12,7 @@ #include "base/ref_counted.h" #include "base/time.h" #include "googleurl/src/gurl.h" +#include "webkit/blob/deletable_file_reference.h" namespace WebKit { class WebBlobData; @@ -117,14 +118,12 @@ class BlobData : public base::RefCounted<BlobData> { items_.back().SetToBlob(blob_url, offset, length); } - const std::vector<Item>& items() const { return items_; } - void set_items(const std::vector<Item>& items) { - items_ = items; - } - void swap_items(std::vector<Item>* items) { - items_.swap(*items); + void AttachDeletableFileReference(DeletableFileReference* reference) { + deletable_files_.push_back(reference); } + const std::vector<Item>& items() const { return items_; } + const std::string& content_type() const { return content_type_; } void set_content_type(const std::string& content_type) { content_type_ = content_type; @@ -137,6 +136,11 @@ class BlobData : public base::RefCounted<BlobData> { content_disposition_ = content_disposition; } + // Should only be called by the IPC ParamTraits for this class. + void swap_items(std::vector<Item>* items) { + items_.swap(*items); + } + private: friend class base::RefCounted<BlobData>; @@ -145,6 +149,9 @@ class BlobData : public base::RefCounted<BlobData> { std::string content_type_; std::string content_disposition_; std::vector<Item> items_; + std::vector<scoped_refptr<DeletableFileReference> > deletable_files_; + + DISALLOW_COPY_AND_ASSIGN(BlobData); }; #if defined(UNIT_TEST) |