| Index: content/browser/fileapi/fileapi_message_filter.h
|
| ===================================================================
|
| --- content/browser/fileapi/fileapi_message_filter.h (revision 183651)
|
| +++ content/browser/fileapi/fileapi_message_filter.h (working copy)
|
| @@ -11,7 +11,6 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/files/file_util_proxy.h"
|
| -#include "base/hash_tables.h"
|
| #include "base/id_map.h"
|
| #include "base/platform_file.h"
|
| #include "base/shared_memory.h"
|
| @@ -38,6 +37,7 @@
|
| } // namespace net
|
|
|
| namespace webkit_blob {
|
| +class BlobStorageConsumer;
|
| class ShareableFileReference;
|
| }
|
|
|
| @@ -101,7 +101,7 @@
|
| void OnReadDirectory(int request_id, const GURL& path);
|
| void OnWrite(int request_id,
|
| const GURL& path,
|
| - const GURL& blob_url,
|
| + const std::string& blob_uuid,
|
| int64 offset);
|
| void OnTruncate(int request_id, const GURL& path, int64 length);
|
| void OnTouchFile(int request_id,
|
| @@ -123,14 +123,19 @@
|
| const GURL& blob_url,
|
| const GURL& path);
|
|
|
| - void OnStartBuildingBlob(const GURL& url);
|
| - void OnAppendBlobDataItem(const GURL& url,
|
| - const webkit_blob::BlobData::Item& item);
|
| - void OnAppendSharedMemory(const GURL& url, base::SharedMemoryHandle handle,
|
| - size_t buffer_size);
|
| - void OnFinishBuildingBlob(const GURL& url, const std::string& content_type);
|
| - void OnCloneBlob(const GURL& url, const GURL& src_url);
|
| - void OnRemoveBlob(const GURL& url);
|
| + void OnStartBuildingBlob2(const std::string& uuid);
|
| + void OnAppendBlobDataItem2(const std::string& uuid,
|
| + const webkit_blob::BlobData::Item& item);
|
| + void OnAppendSharedMemory2(const std::string& uuid,
|
| + base::SharedMemoryHandle handle,
|
| + size_t buffer_size);
|
| + void OnFinishBuildingBlob2(const std::string& uuid,
|
| + const std::string& content_type);
|
| + void OnCancelBuildingBlob(const std::string& uuid);
|
| + void OnIncrementBlobRefCount(const std::string& uuid);
|
| + void OnDecrementBlobRefCount(const std::string& uuid);
|
| + void OnRegisterPublicBlobURL(const GURL& public_url, const std::string& uuid);
|
| + void OnRevokePublicBlobURL(const GURL& public_url);
|
|
|
| // Callback functions to be used when each file operation is finished.
|
| void DidFinish(int request_id, base::PlatformFileError result);
|
| @@ -204,10 +209,11 @@
|
|
|
| scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
|
|
|
| - // Keep track of blob URLs registered in this process. Need to unregister
|
| - // all of them when the renderer process dies.
|
| - base::hash_set<std::string> blob_urls_;
|
| + // Keep track of blobs utilized in this process and cleans up
|
| + // accordingly when the renderer process dies.
|
| + scoped_ptr<webkit_blob::BlobStorageConsumer> blob_storage_consumer_;
|
|
|
| +
|
| // Used to keep snapshot files alive while a DidCreateSnapshot
|
| // is being sent to the renderer.
|
| std::map<int, scoped_refptr<webkit_blob::ShareableFileReference> >
|
|
|