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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 syntax = "proto2"; 5 syntax = "proto2";
6 6
7 option optimize_for = LITE_RUNTIME; 7 option optimize_for = LITE_RUNTIME;
8 8
9 package content; 9 package content;
10 10
11 message ServiceWorkerOriginTrialFeature {
12 required string name = 1;
13 repeated string tokens = 2;
14 }
15
16 message ServiceWorkerOriginTrialInfo {
17 repeated ServiceWorkerOriginTrialFeature features = 1;
18 }
19
11 message ServiceWorkerRegistrationData { 20 message ServiceWorkerRegistrationData {
12 required int64 registration_id = 1; 21 required int64 registration_id = 1;
13 required string scope_url = 2; 22 required string scope_url = 2;
14 required string script_url = 3; 23 required string script_url = 3;
15 24
16 // Versions are first stored once they successfully install and become the 25 // Versions are first stored once they successfully install and become the
17 // waiting version. Then they are updated when they transition to the active 26 // waiting version. Then they are updated when they transition to the active
18 // version. 27 // version.
19 required int64 version_id = 4; 28 required int64 version_id = 4;
20 29
21 required bool is_active = 5; 30 required bool is_active = 5;
22 required bool has_fetch_handler = 6; 31 required bool has_fetch_handler = 6;
23 32
24 // Serialized by Time::ToInternalValue(). 33 // Serialized by Time::ToInternalValue().
25 required int64 last_update_check_time = 7; 34 required int64 last_update_check_time = 7;
26 35
27 optional uint64 resources_total_size_bytes = 8; 36 optional uint64 resources_total_size_bytes = 8;
28 37
29 repeated string foreign_fetch_scope = 9; 38 repeated string foreign_fetch_scope = 9;
30 repeated string foreign_fetch_origin = 10; 39 repeated string foreign_fetch_origin = 10;
40
41 // If the registration data was created by old Chrome (< M55),
42 // |origin_trial_tokens| is not set. In this case, we have to start the
43 // Service Worker and load the main script resource in ServiceWorkerStorage
44 // to check the HTTP header.
45 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.
31 } 46 }
32 47
33 message ServiceWorkerResourceRecord { 48 message ServiceWorkerResourceRecord {
34 required int64 resource_id = 1; 49 required int64 resource_id = 1;
35 required string url = 2; 50 required string url = 2;
36 optional uint64 size_bytes = 3; 51 optional uint64 size_bytes = 3;
37 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698