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

Unified Diff: content/browser/service_worker/service_worker_database.proto

Issue 2376403004: Store Origin-Trial tokens to ServiceWorkerDataBase (Closed)
Patch Set: incorporated chasej's comment 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/service_worker/service_worker_database.proto
diff --git a/content/browser/service_worker/service_worker_database.proto b/content/browser/service_worker/service_worker_database.proto
index e85f2a7c83051c61d94ebdad2d83976613cdb6b4..8743671778e39c756451ba32c335aefcf10237f3 100644
--- a/content/browser/service_worker/service_worker_database.proto
+++ b/content/browser/service_worker/service_worker_database.proto
@@ -8,6 +8,15 @@ option optimize_for = LITE_RUNTIME;
package content;
+message ServiceWorkerOriginTrialFeature {
+ required string name = 1;
+ repeated string tokens = 2;
+}
+
+message ServiceWorkerOriginTrialInfo {
+ repeated ServiceWorkerOriginTrialFeature features = 1;
+}
+
message ServiceWorkerRegistrationData {
required int64 registration_id = 1;
required string scope_url = 2;
@@ -28,6 +37,12 @@ message ServiceWorkerRegistrationData {
repeated string foreign_fetch_scope = 9;
repeated string foreign_fetch_origin = 10;
+
+ // If the registration data was created by old Chrome (< M55),
+ // |origin_trial_tokens| is not set. In this case, we have to start the
+ // Service Worker and load the main script resource in ServiceWorkerStorage
+ // to check the HTTP header.
+ optional ServiceWorkerOriginTrialInfo origin_trial_tokens = 11;
nhiroki 2016/10/07 04:40:34 Doesn't this work? repeated ServiceWorkerOrigin
horo 2016/10/07 05:33:32 If we use "repeated", we can't distinguish empty (
nhiroki 2016/10/07 05:59:04 Thank you. I understand the situation.
}
message ServiceWorkerResourceRecord {

Powered by Google App Engine
This is Rietveld 408576698