diff --git a/content/browser/quota/quota_context.cc b/content/browser/quota/quota_context.cc index 6c6a7c31f88c6a..b2ff3af8c7b179 100644 --- a/content/browser/quota/quota_context.cc +++ b/content/browser/quota/quota_context.cc @@ -71,7 +71,7 @@ void QuotaContext::BindQuotaManagerHostOnIOThread( // The quota manager currently runs on the I/O thread. auto host = std::make_unique( - process_id, render_frame_id, storage_key.origin(), quota_manager_.get(), + process_id, render_frame_id, storage_key, quota_manager_.get(), permission_context_.get(), quota_change_dispatcher_); auto* host_ptr = host.get(); receivers_.Add(host_ptr, std::move(receiver), std::move(host)); diff --git a/content/browser/quota/quota_manager_host.cc b/content/browser/quota/quota_manager_host.cc index 50af1ce4fc29b8..727f137b71608e 100644 --- a/content/browser/quota/quota_manager_host.cc +++ b/content/browser/quota/quota_manager_host.cc @@ -32,13 +32,13 @@ namespace content { QuotaManagerHost::QuotaManagerHost( int process_id, int render_frame_id, - const url::Origin& origin, + const blink::StorageKey& storage_key, storage::QuotaManager* quota_manager, QuotaPermissionContext* permission_context, scoped_refptr quota_change_dispatcher) : process_id_(process_id), render_frame_id_(render_frame_id), - storage_key_(blink::StorageKey(origin)), + storage_key_(storage_key), quota_manager_(quota_manager), permission_context_(permission_context), quota_change_dispatcher_(std::move(quota_change_dispatcher)) { diff --git a/content/browser/quota/quota_manager_host.h b/content/browser/quota/quota_manager_host.h index 24afa99a90355e..5462373c1be0e5 100644 --- a/content/browser/quota/quota_manager_host.h +++ b/content/browser/quota/quota_manager_host.h @@ -21,14 +21,10 @@ namespace storage { class QuotaManager; } -namespace url { -class Origin; -} - namespace content { class QuotaPermissionContext; -// Implements the Quota (Storage) API for a single origin. +// Implements the Quota (Storage) API for a single StorageKey. // // QuotaContext indirectly owns all QuotaManagerHost instances associated with a // StoragePartition. A new instance is created for every incoming mojo @@ -41,14 +37,12 @@ class QuotaPermissionContext; // is likely to change when QuotaManager moves to the Storage Service. class QuotaManagerHost : public blink::mojom::QuotaManagerHost { public: - // The owner must guarantee that |quota_manager| and |permission_context| + // The owner must guarantee that `quota_manager` and `permission_context` // outlive this instance. - // TODO(crbug.com/1215208): Change the constructor to take a StorageKey - // instead of an Origin. QuotaManagerHost( int process_id, int render_frame_id, - const url::Origin& origin, + const blink::StorageKey& storage_key, storage::QuotaManager* quota_manager, QuotaPermissionContext* permission_context, scoped_refptr quota_change_dispatcher);