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

Unified Diff: content/browser/fileapi/fileapi_message_filter.h

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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: content/browser/fileapi/fileapi_message_filter.h
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h
index 873d01063fc23fe44c754c85e5dd1cf19a98515a..6a3b2319871604828df9d4a027b7e1c6cd44a18d 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -45,6 +45,7 @@ class URLRequestContextGetter;
} // namespace net
namespace webkit_blob {
+class BlobStorageHost;
class ShareableFileReference;
}
@@ -111,6 +112,11 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
void OnReadDirectory(int request_id, const GURL& path);
void OnWrite(int request_id,
const GURL& path,
+ const std::string& blob_uuid,
+ int64 offset);
+ void OnWriteDeprecated(
+ int request_id,
+ const GURL& path,
const GURL& blob_url,
int64 offset);
void OnTruncate(int request_id, const GURL& path, int64 length);
@@ -131,14 +137,26 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
// Handlers for BlobHostMsg_ family messages.
- void OnStartBuildingBlob(const GURL& url);
- void OnAppendBlobDataItemToBlob(
- const GURL& url, const webkit_blob::BlobData::Item& item);
- void OnAppendSharedMemoryToBlob(
- 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 OnStartBuildingBlob(const std::string& uuid);
+ void OnAppendBlobDataItemToBlob(const std::string& uuid,
+ const webkit_blob::BlobData::Item& item);
+ void OnAppendSharedMemoryToBlob(const std::string& uuid,
+ base::SharedMemoryHandle handle,
+ size_t buffer_size);
+ void OnFinishBuildingBlob(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);
+
+ // Extra methods to establish a mapping from old-style blobURLs to uuids,
+ // and to clone them. These won't be here for long, just during a
+ // transition period. See crbug/174200
+ void OnDeprecatedRegisterBlobURL(const GURL& url, const std::string& uuid);
+ void OnDeprecatedCloneBlobURL(const GURL& url, const GURL& existing_url);
+ void OnDeprecatedRevokeBlobURL(const GURL& url);
// Handlers for StreamHostMsg_ family messages.
//
@@ -225,9 +243,9 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
scoped_ptr<fileapi::FileSystemOperationRunner> operation_runner_;
- // 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_;
+ // Keeps track of blobs used in this process and cleans up
+ // when the renderer process dies.
+ scoped_ptr<webkit_blob::BlobStorageHost> blob_storage_host_;
// Keep track of stream URLs registered in this process. Need to unregister
// all of them when the renderer process dies.
« no previous file with comments | « content/browser/fileapi/chrome_blob_storage_context.cc ('k') | content/browser/fileapi/fileapi_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698