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

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

Issue 475063004: IndexedDB + Coding Style: re-order enums/typedefs/... to match guide (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after r291485 Created 6 years, 4 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/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.
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.h ('k') | content/browser/indexed_db/indexed_db_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698