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

Unified Diff: content/common/origin_util.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 years, 4 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
« no previous file with comments | « content/common/origin_trials/trial_token.cc ('k') | content/public/common/common_param_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/origin_util.cc
diff --git a/content/common/origin_util.cc b/content/common/origin_util.cc
index 4de5ccb62c661c21391d9e36c10e3626786ceb66..3ff16ce693dc8dc32afeacbab6a2581045a56394 100644
--- a/content/common/origin_util.cc
+++ b/content/common/origin_util.cc
@@ -14,12 +14,12 @@
namespace {
-// This function partially reflects the result from SecurityOrigin::isUnique,
+// This function partially reflects the result from SecurityOrigin::isOpaque,
// not its actual implementation. It takes into account how
-// SecurityOrigin::create might return unique origins for URLs whose schemes are
+// SecurityOrigin::create might return opaque origins for URLs whose schemes are
// included in SchemeRegistry::shouldTreatURLSchemeAsNoAccess.
-bool IsOriginUnique(const url::Origin& origin) {
- return origin.unique() ||
+bool IsOriginOpaque(const url::Origin& origin) {
+ return origin.opaque() ||
base::ContainsValue(url::GetNoAccessSchemes(), origin.scheme());
}
@@ -60,7 +60,7 @@ bool OriginCanAccessServiceWorkers(const GURL& url) {
}
bool IsOriginWhiteListedTrustworthy(const url::Origin& origin) {
- if (IsOriginUnique(origin))
+ if (IsOriginOpaque(origin))
return false;
return base::ContainsValue(GetSecureOrigins(),
@@ -73,7 +73,7 @@ bool IsPotentiallyTrustworthyOrigin(const url::Origin& origin) {
// implementation follows Blink's default behavior but in the renderer it can
// be changed per instance by calls to
// SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy.
- if (IsOriginUnique(origin))
+ if (IsOriginOpaque(origin))
return false;
if (base::ContainsValue(url::GetSecureSchemes(), origin.scheme()) ||
« no previous file with comments | « content/common/origin_trials/trial_token.cc ('k') | content/public/common/common_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698