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

Unified Diff: content/common/service_worker/service_worker_types.h

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: change useCache to updateViaCache Created 3 years, 6 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/common/service_worker/service_worker_types.h
diff --git a/content/common/service_worker/service_worker_types.h b/content/common/service_worker/service_worker_types.h
index a3f10c418d8177e3322f1f98eade3478c753b917..ca9b29718a296b202dacb17bae13428c91974aad 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -23,6 +23,7 @@
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponseError.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerState.h"
+#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerUpdateViaCache.h"
#include "url/gurl.h"
// This file is to have common definitions that are to be shared by
@@ -221,10 +222,21 @@ struct CONTENT_EXPORT ServiceWorkerObjectInfo {
int64_t version_id;
};
+struct CONTENT_EXPORT ServiceWorkerRegistrationOptions {
+ ServiceWorkerRegistrationOptions();
+ // Initialize |scope| with the specified value and the rest with defaults
+ explicit ServiceWorkerRegistrationOptions(const GURL& scope);
+ ServiceWorkerRegistrationOptions(
+ const GURL& scope,
+ blink::WebServiceWorkerUpdateViaCache update_via_cache);
+ GURL scope;
+ blink::WebServiceWorkerUpdateViaCache update_via_cache;
+};
+
struct CONTENT_EXPORT ServiceWorkerRegistrationObjectInfo {
ServiceWorkerRegistrationObjectInfo();
int handle_id;
- GURL scope;
+ ServiceWorkerRegistrationOptions options;
int64_t registration_id;
};

Powered by Google App Engine
This is Rietveld 408576698