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

Unified Diff: content/browser/cache_storage/cache_storage_dispatcher_host.cc

Issue 2385533002: Replace usage of GURL(origin.Serialize()) with origin.GetURL() (Closed)
Patch Set: ncarter comments 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/cache_storage/cache_storage_dispatcher_host.cc
diff --git a/content/browser/cache_storage/cache_storage_dispatcher_host.cc b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
index 04138969b4af9321055adf4c535165e1b58b282c..9b111d9cab93a824f4fb9110efcac53fdae9f8ba 100644
--- a/content/browser/cache_storage/cache_storage_dispatcher_host.cc
+++ b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
@@ -61,7 +61,7 @@ blink::WebServiceWorkerCacheError ToWebServiceWorkerCacheError(
}
bool OriginCanAccessCacheStorage(const url::Origin& origin) {
- return !origin.unique() && IsOriginSecure(GURL(origin.Serialize()));
+ return !origin.unique() && IsOriginSecure(origin.GetURL());
}
void StopPreservingCache(
@@ -132,7 +132,7 @@ void CacheStorageDispatcherHost::OnCacheStorageHas(
return;
}
context_->cache_manager()->HasCache(
- GURL(origin.Serialize()), base::UTF16ToUTF8(cache_name),
+ origin.GetURL(), base::UTF16ToUTF8(cache_name),
base::Bind(&CacheStorageDispatcherHost::OnCacheStorageHasCallback, this,
thread_id, request_id));
}
@@ -149,7 +149,7 @@ void CacheStorageDispatcherHost::OnCacheStorageOpen(
return;
}
context_->cache_manager()->OpenCache(
- GURL(origin.Serialize()), base::UTF16ToUTF8(cache_name),
+ origin.GetURL(), base::UTF16ToUTF8(cache_name),
base::Bind(&CacheStorageDispatcherHost::OnCacheStorageOpenCallback, this,
thread_id, request_id));
}
@@ -166,7 +166,7 @@ void CacheStorageDispatcherHost::OnCacheStorageDelete(
return;
}
context_->cache_manager()->DeleteCache(
- GURL(origin.Serialize()), base::UTF16ToUTF8(cache_name),
+ origin.GetURL(), base::UTF16ToUTF8(cache_name),
base::Bind(&CacheStorageDispatcherHost::OnCacheStorageDeleteCallback,
this, thread_id, request_id));
}
@@ -181,7 +181,7 @@ void CacheStorageDispatcherHost::OnCacheStorageKeys(int thread_id,
return;
}
context_->cache_manager()->EnumerateCaches(
- GURL(origin.Serialize()),
+ origin.GetURL(),
base::Bind(&CacheStorageDispatcherHost::OnCacheStorageKeysCallback, this,
thread_id, request_id));
}
@@ -205,14 +205,13 @@ void CacheStorageDispatcherHost::OnCacheStorageMatch(
if (match_params.cache_name.is_null()) {
context_->cache_manager()->MatchAllCaches(
- GURL(origin.Serialize()), std::move(scoped_request), match_params,
+ origin.GetURL(), std::move(scoped_request), match_params,
base::Bind(&CacheStorageDispatcherHost::OnCacheStorageMatchCallback,
this, thread_id, request_id));
return;
}
context_->cache_manager()->MatchCache(
- GURL(origin.Serialize()),
- base::UTF16ToUTF8(match_params.cache_name.string()),
+ origin.GetURL(), base::UTF16ToUTF8(match_params.cache_name.string()),
std::move(scoped_request), match_params,
base::Bind(&CacheStorageDispatcherHost::OnCacheStorageMatchCallback, this,
thread_id, request_id));

Powered by Google App Engine
This is Rietveld 408576698