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

Unified Diff: webkit/blob/blob_storage_controller.h

Issue 7974011: Break large blobs into multiple ipcs during creation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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: webkit/blob/blob_storage_controller.h
===================================================================
--- webkit/blob/blob_storage_controller.h (revision 102191)
+++ webkit/blob/blob_storage_controller.h (working copy)
@@ -8,6 +8,7 @@
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/process.h"
+#include "webkit/blob/blob_data.h"
class GURL;
class FilePath;
@@ -21,15 +22,15 @@
namespace webkit_blob {
-class BlobData;
-
// This class handles the logistics of blob Storage within the browser process.
class BlobStorageController {
public:
BlobStorageController();
~BlobStorageController();
- void RegisterBlobUrl(const GURL& url, const BlobData* blob_data);
+ void RegisterUnfinalizedBlobUrl(const GURL& url);
+ void AppendBlobDataItem(const GURL& url, const BlobData::Item& data_item);
+ void FinalizeBlob(const GURL& url, const std::string& content_type);
void RegisterBlobUrlFrom(const GURL& url, const GURL& src_url);
void UnregisterBlobUrl(const GURL& url);
BlobData* GetBlobDataFromUrl(const GURL& url);
@@ -49,8 +50,12 @@
const FilePath& file_path, uint64 offset, uint64 length,
const base::Time& expected_modification_time);
+ void GetUnfinalizedBlobDataFromUrl(const GURL& url);
+
typedef base::hash_map<std::string, scoped_refptr<BlobData> > BlobMap;
BlobMap blob_map_;
+ BlobMap unfinalized_blob_map_;
+ int64 memory_usage_;
jianli 2011/09/23 23:00:42 Please add comment for this variable.
michaeln 2011/09/24 01:15:24 I thought memory_usage_ was mnemonic enough. What
jianli 2011/09/27 01:12:18 Better to comment about what kind of stuffs are co
michaeln 2011/09/27 23:27:31 Done.
DISALLOW_COPY_AND_ASSIGN(BlobStorageController);
};

Powered by Google App Engine
This is Rietveld 408576698