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

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

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unobserve functionality Created 4 years, 6 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 c84eb91ff77fc54d91472d719a2d2fdcc83dabb8..609801e489138d2a8d029deea718ddda8c2958fd 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -108,12 +108,6 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
int64_t host_transaction_id);
static uint32_t TransactionIdToProcessId(int64_t host_transaction_id);
- // These are called to map a 32-bit front-end (renderer-specific) observer
- // id to and from a back-end ("host") observer id that encodes the process
- // id in the high 32 bits. The mapping is host-specific and ids are validated.
- int64_t HostObserverId(int64_t observer_id);
- int64_t RendererObserverId(int64_t host_observer_id);
-
std::string HoldBlobData(const IndexedDBBlobInfo& blob_info);
private:
@@ -183,7 +177,10 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
void OnObserve(int32_t ipc_thread_id,
int32_t ipc_database_id,
int64_t transaction_id,
- int64_t observer_id);
+ int32_t observer_id);
+ void OnUnobserve(int32_t ipc_thread_id,
+ int32_t ipc_database_id,
+ std::vector<int32_t> remove_observers);
void OnGet(const IndexedDBHostMsg_DatabaseGet_Params& params);
void OnGetAll(const IndexedDBHostMsg_DatabaseGetAll_Params& params);
// OnPutWrapper starts on the IO thread so that it can grab BlobDataHandles
@@ -220,6 +217,9 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
storage::QuotaStatusCode status,
int64_t usage,
int64_t quota);
+ int64_t GenerateObserverId(int32_t observer_id, int32_t ipc_thread_id);
dmurph 2016/06/16 07:30:33 How about calling the result ObserverAndThreadId?
palakj1 2016/06/16 17:51:41 Done
+ std::vector<int64_t> RemoveObservers(std::vector<int32_t> remove_observers,
dmurph 2016/06/16 07:30:33 We still need the ipc_thread_id here as well.
palakj1 2016/06/16 17:51:41 Done
+ int32_t ipc_database_id);
dmurph 2016/06/16 07:30:33 Make sure we store a vector<std::pair<int32_t, int
palakj1 2016/06/16 17:51:41 done
IndexedDBDispatcherHost* parent_;
IDMap<IndexedDBConnection, IDMapOwnPointer> map_;

Powered by Google App Engine
This is Rietveld 408576698