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

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

Issue 2601163002: Remove indexed_db_messages.h. (Closed)
Patch Set: Set up the factory on the right thread. Created 4 years 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..b30e79e7576318965216484db8f07cafa3b35010 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -34,8 +34,8 @@ class IndexedDBDatabaseCallbacks;
// Handles all IndexedDB related messages from a particular renderer process.
cmumford 2017/01/05 00:29:01 No longer need to include content/public/browser/b
Reilly Grant (use Gerrit) 2017/01/06 02:23:35 Done.
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 Bind(::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);
};

Powered by Google App Engine
This is Rietveld 408576698