summaryrefslogtreecommitdiffstats
path: root/url
diff options
context:
space:
mode:
authormek <mek@chromium.org>2016-02-17 15:50:59 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-17 23:52:55 +0000
commit0126c13fddde0066adf3ae782d135968b5ad8b6f (patch)
treedb4334c6f12530f405116a3e58f57d76ea45b189 /url
parentb1487587329131066ed0db7d2429b2b84f281e35 (diff)
downloadchromium_src-0126c13fddde0066adf3ae782d135968b5ad8b6f.zip
chromium_src-0126c13fddde0066adf3ae782d135968b5ad8b6f.tar.gz
chromium_src-0126c13fddde0066adf3ae782d135968b5ad8b6f.tar.bz2
Add origins argument to registerForeignFetchScopes.
Adds the new argument, stores the list of origins for which to intercept requests, and adds origin checks to the interception code. Also updated the various unit and layout tests. This implements (parts of) the changes to the spec made in https://github.com/mkruisselbrink/ServiceWorker/commit/88bbe9324fa8ac38d8af3e347564450d598757aa BUG=540509 Review URL: https://codereview.chromium.org/1656933003 Cr-Commit-Position: refs/heads/master@{#376036}
Diffstat (limited to 'url')
-rw-r--r--url/origin.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/url/origin.h b/url/origin.h
index aed9813..aab1f05 100644
--- a/url/origin.h
+++ b/url/origin.h
@@ -118,6 +118,9 @@ class URL_EXPORT Origin {
// Two Origins are "same-origin" if their schemes, hosts, and ports are exact
// matches; and neither is unique.
bool IsSameOriginWith(const Origin& other) const;
+ bool operator==(const Origin& other) const {
+ return IsSameOriginWith(other);
+ }
// Allows Origin to be used as a key in STL (for example, a std::set or
// std::map).