Skip to content

Commit

Permalink
Refactor the storage QuotaDatabase to use StorageKey
Browse files Browse the repository at this point in the history
This is part of an effort to move the storage APIs to use StorageKey
instead of Origin.  For now, the QuotaManager has been changed to
convert an Origin to a StorageKey before calling the QuotaDatabase APIs.
A subsequent CL will change the QuotaManager APIs to use StorageKey.

The Quota APIs left to migrate to StorageKey after this CL:
  QuotaManagerImpl
  QuotaManagerProxy
  QuotaClient

Bug: 1215208
Change-Id: Icaa53e90bcfe9d4f4e60e976c29a696ab74c7b7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2941645
Commit-Queue: Ali Beyad <abeyad@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Steven Bingler <bingler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#892258}
  • Loading branch information
abeyad authored and Chromium LUCI CQ committed Jun 14, 2021
1 parent 2bab3b8 commit 1169211
Show file tree
Hide file tree
Showing 7 changed files with 472 additions and 379 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "chrome/browser/ui/webui/quota_internals/quota_internals_handler.h"
#include "chrome/browser/ui/webui/quota_internals/quota_internals_types.h"
#include "content/public/browser/browser_task_traits.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/quota/quota_types.mojom-forward.h"
#include "url/origin.h"

Expand Down Expand Up @@ -144,7 +145,7 @@ void QuotaInternalsProxy::DidDumpBucketTable(
origin_info.reserve(entries.size());

for (const auto& entry : entries) {
PerOriginStorageInfo info(entry.origin.GetURL(), entry.type);
PerOriginStorageInfo info(entry.storage_key.origin().GetURL(), entry.type);
info.set_used_count(entry.use_count);
info.set_last_access_time(entry.last_accessed);
info.set_last_modified_time(entry.last_modified);
Expand Down

0 comments on commit 1169211

Please sign in to comment.