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

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

Issue 2385533002: Replace usage of GURL(origin.Serialize()) with origin.GetURL() (Closed)
Patch Set: sync to #424762 Created 4 years, 2 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_context_impl.cc
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index 0dce05aa71c568bb41996883a60ea355a3b64608..01ffd17704738173bb45aefbc6d4018613380762 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -149,9 +149,9 @@ std::vector<IndexedDBInfo> IndexedDBContextImpl::GetAllOriginsInfo() {
std::vector<IndexedDBInfo> result;
for (const auto& origin : origins) {
size_t connection_count = GetConnectionCount(origin);
- result.push_back(
- IndexedDBInfo(GURL(origin.Serialize()), GetOriginDiskUsage(origin),
- GetOriginLastModified(origin), connection_count));
+ result.push_back(IndexedDBInfo(origin.GetURL(), GetOriginDiskUsage(origin),
+ GetOriginLastModified(origin),
+ connection_count));
}
return result;
}
@@ -439,7 +439,7 @@ void IndexedDBContextImpl::ConnectionOpened(const Origin& origin,
IndexedDBConnection* connection) {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
quota_manager_proxy()->NotifyStorageAccessed(
- storage::QuotaClient::kIndexedDatabase, GURL(origin.Serialize()),
+ storage::QuotaClient::kIndexedDatabase, origin.GetURL(),
storage::kStorageTypeTemporary);
if (AddToOriginSet(origin)) {
// A newly created db, notify the quota system.
@@ -453,7 +453,7 @@ void IndexedDBContextImpl::ConnectionClosed(const Origin& origin,
IndexedDBConnection* connection) {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
quota_manager_proxy()->NotifyStorageAccessed(
- storage::QuotaClient::kIndexedDatabase, GURL(origin.Serialize()),
+ storage::QuotaClient::kIndexedDatabase, origin.GetURL(),
storage::kStorageTypeTemporary);
if (factory_.get() && factory_->GetConnectionCount(origin) == 0)
QueryDiskAndUpdateQuotaUsage(origin);
@@ -499,8 +499,7 @@ IndexedDBContextImpl::~IndexedDBContextImpl() {
// static
base::FilePath IndexedDBContextImpl::GetBlobStoreFileName(
const Origin& origin) {
- std::string origin_id =
- storage::GetIdentifierFromOrigin(GURL(origin.Serialize()));
+ std::string origin_id = storage::GetIdentifierFromOrigin(origin.GetURL());
return base::FilePath()
.AppendASCII(origin_id)
.AddExtension(kIndexedDBExtension)
@@ -509,8 +508,7 @@ base::FilePath IndexedDBContextImpl::GetBlobStoreFileName(
// static
base::FilePath IndexedDBContextImpl::GetLevelDBFileName(const Origin& origin) {
- std::string origin_id =
- storage::GetIdentifierFromOrigin(GURL(origin.Serialize()));
+ std::string origin_id = storage::GetIdentifierFromOrigin(origin.GetURL());
return base::FilePath()
.AppendASCII(origin_id)
.AddExtension(kIndexedDBExtension)
@@ -551,7 +549,7 @@ void IndexedDBContextImpl::QueryDiskAndUpdateQuotaUsage(const Origin& origin) {
if (difference) {
origin_size_map_[origin] = current_disk_usage;
quota_manager_proxy()->NotifyStorageModified(
- storage::QuotaClient::kIndexedDatabase, GURL(origin.Serialize()),
+ storage::QuotaClient::kIndexedDatabase, origin.GetURL(),
storage::kStorageTypeTemporary, difference);
}
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698