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

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

Issue 2601163002: Remove indexed_db_messages.h. (Closed)
Patch Set: Addressed cmumford's feedback. Created 3 years, 11 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 33a55d7417bf373d67f0bd77ac1a2b24dc31e227..ed511b7fa445006838fa042b3672144abeb53c21 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -17,8 +17,8 @@
#include "base/memory/ref_counted.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/common/indexed_db/indexed_db.mojom.h"
-#include "content/public/browser/browser_associated_interface.h"
-#include "content/public/browser/browser_message_filter.h"
+#include "content/public/browser/browser_thread.h"
+#include "mojo/public/cpp/bindings/associated_binding_set.h"
#include "net/url_request/url_request_context_getter.h"
#include "storage/browser/blob/blob_data_handle.h"
@@ -34,8 +34,8 @@ class IndexedDBDatabaseCallbacks;
// Handles all IndexedDB related messages from a particular renderer process.
class IndexedDBDispatcherHost
- : public BrowserMessageFilter,
- public BrowserAssociatedInterface<::indexed_db::mojom::Factory>,
+ : public base::RefCountedThreadSafe<IndexedDBDispatcherHost,
+ BrowserThread::DeleteOnIOThread>,
public ::indexed_db::mojom::Factory {
public:
// Only call the constructor from the UI thread.
@@ -44,10 +44,7 @@ class IndexedDBDispatcherHost
IndexedDBContextImpl* indexed_db_context,
ChromeBlobStorageContext* blob_storage_context);
- // BrowserMessageFilter implementation.
- void OnChannelClosing() override;
- void OnDestruct() const override;
- bool OnMessageReceived(const IPC::Message& message) override;
+ void AddBinding(::indexed_db::mojom::FactoryAssociatedRequest request);
// A shortcut for accessing our context.
IndexedDBContextImpl* context() const { return indexed_db_context_.get(); }
@@ -59,10 +56,6 @@ class IndexedDBDispatcherHost
std::string HoldBlobData(const IndexedDBBlobInfo& blob_info);
void DropBlobData(const std::string& uuid);
- // True if the channel is closing/closed and outstanding requests
- // can be abandoned. Only access on IndexedDB thread.
- bool IsOpen() const;
-
private:
// Friends to enable OnDestruct() delegation.
friend class BrowserThread;
@@ -112,11 +105,10 @@ class IndexedDBDispatcherHost
std::pair<std::unique_ptr<storage::BlobDataHandle>, int>>
blob_data_handle_map_;
- // Only access on IndexedDB thread.
- bool is_open_ = true;
-
// Used to set file permissions for blob storage.
- int ipc_process_id_;
+ const int ipc_process_id_;
+
+ mojo::AssociatedBindingSet<::indexed_db::mojom::Factory> bindings_;
DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
};
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_unittest.cc ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698