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

Unified Diff: webkit/blob/blob_data.h

Issue 3582002: Add deletable file refs to Blobs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/blob/blob_data.h
===================================================================
--- webkit/blob/blob_data.h (revision 61866)
+++ webkit/blob/blob_data.h (working copy)
@@ -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 @@
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 AttachDeletableFileReference(DeletableFileReference* reference) {
+ deletable_files_.push_back(reference);
}
- void swap_items(std::vector<Item>* items) {
- items_.swap(*items);
- }
+ 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 @@
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 @@
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)
« no previous file with comments | « no previous file | webkit/blob/blob_storage_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698