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

Unified Diff: content/browser/indexed_db/indexed_db_quota_client.cc

Issue 1841553002: IndexedDB: Use url::Origin rather than GURL for representing origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin-idb
Patch Set: Rebased Created 4 years, 8 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_quota_client.cc
diff --git a/content/browser/indexed_db/indexed_db_quota_client.cc b/content/browser/indexed_db/indexed_db_quota_client.cc
index 8fc9ce8cd96fb27a74d93f12eca54bbc82c0a4a1..05eaf36b48154345339999dfbee7438d88d1e1d0 100644
--- a/content/browser/indexed_db/indexed_db_quota_client.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client.cc
@@ -36,8 +36,8 @@ int64_t GetOriginUsageOnIndexedDBThread(IndexedDBContextImpl* context,
void GetAllOriginsOnIndexedDBThread(IndexedDBContextImpl* context,
std::set<GURL>* origins_to_return) {
DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread());
- std::vector<GURL> all_origins = context->GetAllOrigins();
- origins_to_return->insert(all_origins.begin(), all_origins.end());
+ for (const auto& origin : context->GetAllOrigins())
+ origins_to_return->insert(GURL(origin.Serialize()));
}
void DidGetOrigins(const IndexedDBQuotaClient::GetOriginsCallback& callback,
@@ -50,8 +50,8 @@ void GetOriginsForHostOnIndexedDBThread(IndexedDBContextImpl* context,
const std::string& host,
std::set<GURL>* origins_to_return) {
DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread());
- std::vector<GURL> all_origins = context->GetAllOrigins();
- for (const auto& origin_url : all_origins) {
+ for (const auto& origin : context->GetAllOrigins()) {
+ GURL origin_url(origin.Serialize());
if (host == net::GetHostOrSpecFromURL(origin_url))
origins_to_return->insert(origin_url);
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_internals_ui.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698