Chromium Code Reviews| 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 10ef04bd20b497dface5b4cddac758d1216bfd25..c6ae617ddc9e4da4a32abae57c57622af18e2e77 100644 |
| --- a/content/browser/indexed_db/indexed_db_dispatcher_host.h |
| +++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h |
| @@ -104,30 +104,20 @@ 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<webkit_blob::BlobDataHandle*> handles); |
| + // Used in nested classes. |
| + typedef std::map<int32, GURL> WebIDBObjectIDToURLMap; |
| - void ResetDispatcherHosts(); |
| + typedef std::map<int64, GURL> TransactionIDToURLMap; |
|
cmumford
2014/08/20 19:43:05
alphabetical?
jsbell
2014/08/22 20:50:01
Hrm... well, I went ahead and sorted these lines b
|
| + typedef std::map<int64, uint64> TransactionIDToSizeMap; |
| + typedef std::map<int64, int64> TransactionIDToDatabaseIDMap; |
| + typedef std::map<std::string, webkit_blob::BlobDataHandle*> BlobDataHandleMap; |
| // IDMap for RefCounted types |
| template <typename RefCountedType> |
| class RefIDMap { |
| - private: |
| + public: |
| typedef int32 KeyType; |
| - public: |
| RefIDMap() {} |
| ~RefIDMap() {} |
| @@ -154,24 +144,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); |
| @@ -264,14 +236,40 @@ 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<webkit_blob::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_; |
| net::URLRequestContext* request_context_; |
| scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
| - |
| - typedef std::map<std::string, webkit_blob::BlobDataHandle*> BlobDataHandleMap; |
| BlobDataHandleMap blob_data_handle_map_; |
| // Only access on IndexedDB thread. |