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

Unified Diff: content/browser/service_worker/service_worker_version.h

Issue 1656933003: Add origins argument to registerForeignFetchScopes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/service_worker/service_worker_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 3b52fe8ff9f2e853b694e4205add81c3ac566471..b3bdac7527d0182fe063b2057b3b23d1a46c164e 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -149,6 +149,13 @@ class CONTENT_EXPORT ServiceWorkerVersion
foreign_fetch_scopes_ = scopes;
}
+ const std::vector<GURL>& foreign_fetch_origins() const {
+ return foreign_fetch_origins_;
+ }
+ void set_foreign_fetch_origins(const std::vector<GURL>& origins) {
+ foreign_fetch_origins_ = origins;
+ }
+
// This sets the new status and also run status change callbacks
// if there're any (see RegisterStatusChangeCallback).
void SetStatus(Status status);
@@ -561,7 +568,8 @@ class CONTENT_EXPORT ServiceWorkerVersion
const std::string& client_uuid,
const ServiceWorkerClientInfo& client);
- void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes);
+ void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes,
+ const std::vector<GURL>& origins);
void DidEnsureLiveRegistrationForStartWorker(
const StatusCallback& callback,
@@ -644,6 +652,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
const GURL script_url_;
const GURL scope_;
std::vector<GURL> foreign_fetch_scopes_;
+ std::vector<GURL> foreign_fetch_origins_;
Status status_ = NEW;
scoped_ptr<EmbeddedWorkerInstance> embedded_worker_;

Powered by Google App Engine
This is Rietveld 408576698