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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.h

Issue 196473018: Add safe blob-over-IPC transfer from browser->renderer for IDB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style tweaks Created 6 years, 9 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 | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_dispatcher_host.h
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.h b/content/browser/indexed_db/indexed_db_dispatcher_host.h
index bcbbfba029b1c2bf7b15fad8d61f6f9de1c58cb5..9c99dc51d26904268d21fa81c610aec32837d2c4 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -13,6 +13,7 @@
#include "base/memory/ref_counted.h"
#include "content/public/browser/browser_message_filter.h"
#include "url/gurl.h"
+#include "webkit/browser/blob/blob_data_handle.h"
struct IndexedDBDatabaseMetadata;
struct IndexedDBHostMsg_DatabaseCount_Params;
@@ -80,6 +81,11 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
static uint32 TransactionIdToRendererTransactionId(int64 host_transaction_id);
static uint32 TransactionIdToProcessId(int64 host_transaction_id);
+ void HoldBlobDataHandle(
+ const std::string& uuid,
+ scoped_ptr<webkit_blob::BlobDataHandle>& blob_data_handle);
+ void DropBlobDataHandle(const std::string& uuid);
+
private:
// Friends to enable OnDestruct() delegation.
friend class BrowserThread;
@@ -96,6 +102,8 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
void OnIDBFactoryDeleteDatabase(
const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p);
+ void OnAckReceivedBlobs(const std::vector<std::string>& uuids);
+
void ResetDispatcherHosts();
// IDMap for RefCounted types
@@ -230,6 +238,9 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
+ typedef std::map<std::string, webkit_blob::BlobDataHandle*> BlobDataHandleMap;
+ BlobDataHandleMap blob_data_handle_map_;
+
// Only access on IndexedDB thread.
scoped_ptr<DatabaseDispatcherHost> database_dispatcher_host_;
scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_;
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698