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

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

Issue 2472213003: [IndexedDB] Refactoring to remove ref ptrs and host transaction ids. (Closed)
Patch Set: rebased & working Created 4 years, 1 month 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 87011e969923530dfc93e08ccaf95c4789f08422..d41c83886c32a5c9e7c705299c37907dfa04ee7f 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -51,7 +51,7 @@ class IndexedDBDispatcherHost
void OnDestruct() const override;
bool OnMessageReceived(const IPC::Message& message) override;
- void FinishTransaction(int64_t host_transaction_id, bool committed);
+ void NotifyTransactionCommitted(const url::Origin& transaction_origin);
// A shortcut for accessing our context.
IndexedDBContextImpl* context() const { return indexed_db_context_.get(); }
@@ -60,23 +60,6 @@ class IndexedDBDispatcherHost
}
int ipc_process_id() const { return ipc_process_id_; }
- bool RegisterTransactionId(int64_t host_transaction_id,
- const url::Origin& origin);
- bool GetTransactionSize(int64_t host_transaction_id,
- int64_t* transaction_size);
- void AddToTransaction(int64_t host_transaction_id, int64_t value_length);
-
- // These are called to map a 32-bit front-end (renderer-specific) transaction
- // id to and from a back-end ("host") transaction id that encodes the process
- // id in the high 32 bits. The mapping is host-specific and ids are validated.
- int64_t HostTransactionId(int64_t transaction_id);
- int64_t RendererTransactionId(int64_t host_transaction_id);
-
- // These are called to decode a host transaction ID, for diagnostic purposes.
- static uint32_t TransactionIdToRendererTransactionId(
- int64_t host_transaction_id);
- static uint32_t TransactionIdToProcessId(int64_t host_transaction_id);
-
std::string HoldBlobData(const IndexedDBBlobInfo& blob_info);
void DropBlobData(const std::string& uuid);
@@ -89,10 +72,6 @@ class IndexedDBDispatcherHost
friend class BrowserThread;
friend class base::DeleteHelper<IndexedDBDispatcherHost>;
- // Used in nested classes.
- typedef std::map<int64_t, int64_t> TransactionIDToSizeMap;
- typedef std::map<int64_t, url::Origin> TransactionIDToOriginMap;
-
~IndexedDBDispatcherHost() override;
// indexed_db::mojom::Factory implementation:
@@ -139,8 +118,6 @@ class IndexedDBDispatcherHost
// Only access on IndexedDB thread.
bool is_open_ = true;
- TransactionIDToSizeMap transaction_size_map_;
- TransactionIDToOriginMap transaction_origin_map_;
// Used to set file permissions for blob storage.
int ipc_process_id_;

Powered by Google App Engine
This is Rietveld 408576698