| 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 5f3b6a9903400fd0722a595ae5a4e57360787eda..e950862f411d584728cedc467f0354886de10759 100644
|
| --- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
|
| +++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
|
| @@ -103,30 +103,19 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
|
| friend class BrowserThread;
|
| friend class base::DeleteHelper<IndexedDBDispatcherHost>;
|
|
|
| - virtual ~IndexedDBDispatcherHost();
|
| -
|
| - // Message processing. Most of the work is delegated to the dispatcher hosts
|
| - // below.
|
| - void OnIDBFactoryGetDatabaseNames(
|
| - const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p);
|
| - void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p);
|
| -
|
| - void OnIDBFactoryDeleteDatabase(
|
| - const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p);
|
| -
|
| - void OnAckReceivedBlobs(const std::vector<std::string>& uuids);
|
| - void OnPutHelper(const IndexedDBHostMsg_DatabasePut_Params& params,
|
| - std::vector<storage::BlobDataHandle*> handles);
|
| -
|
| - void ResetDispatcherHosts();
|
| + // Used in nested classes.
|
| + typedef std::map<std::string, storage::BlobDataHandle*> BlobDataHandleMap;
|
| + typedef std::map<int64, int64> TransactionIDToDatabaseIDMap;
|
| + typedef std::map<int64, uint64> TransactionIDToSizeMap;
|
| + typedef std::map<int64, GURL> TransactionIDToURLMap;
|
| + typedef std::map<int32, GURL> WebIDBObjectIDToURLMap;
|
|
|
| // IDMap for RefCounted types
|
| template <typename RefCountedType>
|
| class RefIDMap {
|
| - private:
|
| + public:
|
| typedef int32 KeyType;
|
|
|
| - public:
|
| RefIDMap() {}
|
| ~RefIDMap() {}
|
|
|
| @@ -153,24 +142,6 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
|
| DISALLOW_COPY_AND_ASSIGN(RefIDMap);
|
| };
|
|
|
| - // Helper templates.
|
| - template <class ReturnType>
|
| - ReturnType* GetOrTerminateProcess(IDMap<ReturnType, IDMapOwnPointer>* map,
|
| - int32 ipc_return_object_id);
|
| - template <class ReturnType>
|
| - ReturnType* GetOrTerminateProcess(RefIDMap<ReturnType>* map,
|
| - int32 ipc_return_object_id);
|
| -
|
| - template <typename MapType>
|
| - void DestroyObject(MapType* map, int32 ipc_object_id);
|
| -
|
| - // Used in nested classes.
|
| - typedef std::map<int32, GURL> WebIDBObjectIDToURLMap;
|
| -
|
| - typedef std::map<int64, GURL> TransactionIDToURLMap;
|
| - typedef std::map<int64, uint64> TransactionIDToSizeMap;
|
| - typedef std::map<int64, int64> TransactionIDToDatabaseIDMap;
|
| -
|
| class DatabaseDispatcherHost {
|
| public:
|
| explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent);
|
| @@ -263,6 +234,34 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
|
| DISALLOW_COPY_AND_ASSIGN(CursorDispatcherHost);
|
| };
|
|
|
| + virtual ~IndexedDBDispatcherHost();
|
| +
|
| + // Helper templates.
|
| + template <class ReturnType>
|
| + ReturnType* GetOrTerminateProcess(IDMap<ReturnType, IDMapOwnPointer>* map,
|
| + int32 ipc_return_object_id);
|
| + template <class ReturnType>
|
| + ReturnType* GetOrTerminateProcess(RefIDMap<ReturnType>* map,
|
| + int32 ipc_return_object_id);
|
| +
|
| + template <typename MapType>
|
| + void DestroyObject(MapType* map, int32 ipc_object_id);
|
| +
|
| + // Message processing. Most of the work is delegated to the dispatcher hosts
|
| + // below.
|
| + void OnIDBFactoryGetDatabaseNames(
|
| + const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p);
|
| + void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p);
|
| +
|
| + void OnIDBFactoryDeleteDatabase(
|
| + const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p);
|
| +
|
| + void OnAckReceivedBlobs(const std::vector<std::string>& uuids);
|
| + void OnPutHelper(const IndexedDBHostMsg_DatabasePut_Params& params,
|
| + std::vector<storage::BlobDataHandle*> handles);
|
| +
|
| + void ResetDispatcherHosts();
|
| +
|
| // The getter holds the context until OnChannelConnected() can be called from
|
| // the IO thread, which will extract the net::URLRequestContext from it.
|
| scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
|
| @@ -270,7 +269,6 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
|
| scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
|
| scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
|
|
|
| - typedef std::map<std::string, storage::BlobDataHandle*> BlobDataHandleMap;
|
| BlobDataHandleMap blob_data_handle_map_;
|
|
|
| // Only access on IndexedDB thread.
|
|
|