OLD | NEW |
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 { | 11 message ServiceWorkerOriginTrialFeature { |
12 required string name = 1; | 12 required string name = 1; |
13 repeated string tokens = 2; | 13 repeated string tokens = 2; |
14 } | 14 } |
15 | 15 |
16 message ServiceWorkerOriginTrialInfo { | 16 message ServiceWorkerOriginTrialInfo { |
17 repeated ServiceWorkerOriginTrialFeature features = 1; | 17 repeated ServiceWorkerOriginTrialFeature features = 1; |
18 } | 18 } |
19 | 19 |
20 message ServiceWorkerNavigationPreloadState { | 20 message ServiceWorkerNavigationPreloadState { |
21 required bool enabled = 1; | 21 required bool enabled = 1; |
22 optional string header = 2; | 22 optional string header = 2; |
23 } | 23 } |
24 | 24 |
25 message ServiceWorkerRegistrationData { | 25 message ServiceWorkerRegistrationData { |
| 26 enum ServiceWorkerUpdateViaCacheType { |
| 27 IMPORTS = 1; |
| 28 ALL = 2; |
| 29 NONE = 3; |
| 30 } |
| 31 |
26 required int64 registration_id = 1; | 32 required int64 registration_id = 1; |
27 required string scope_url = 2; | 33 required string scope_url = 2; |
28 required string script_url = 3; | 34 required string script_url = 3; |
29 | 35 |
30 // Versions are first stored once they successfully install and become the | 36 // Versions are first stored once they successfully install and become the |
31 // waiting version. Then they are updated when they transition to the active | 37 // waiting version. Then they are updated when they transition to the active |
32 // version. | 38 // version. |
33 required int64 version_id = 4; | 39 required int64 version_id = 4; |
34 | 40 |
35 required bool is_active = 5; | 41 required bool is_active = 5; |
(...skipping 11 matching lines...) Expand all Loading... |
47 // |origin_trial_tokens| is not set. In this case, we have to start the | 53 // |origin_trial_tokens| is not set. In this case, we have to start the |
48 // Service Worker and load the main script resource in ServiceWorkerStorage | 54 // Service Worker and load the main script resource in ServiceWorkerStorage |
49 // to check the HTTP header. | 55 // to check the HTTP header. |
50 optional ServiceWorkerOriginTrialInfo origin_trial_tokens = 11; | 56 optional ServiceWorkerOriginTrialInfo origin_trial_tokens = 11; |
51 | 57 |
52 optional ServiceWorkerNavigationPreloadState navigation_preload_state = 12; | 58 optional ServiceWorkerNavigationPreloadState navigation_preload_state = 12; |
53 | 59 |
54 // The set of features that the worker used up until the time installation | 60 // The set of features that the worker used up until the time installation |
55 // completed. The values must be from blink::UseCounter::Feature enum. | 61 // completed. The values must be from blink::UseCounter::Feature enum. |
56 repeated uint32 used_features = 13; | 62 repeated uint32 used_features = 13; |
| 63 |
| 64 optional ServiceWorkerUpdateViaCacheType update_via_cache = 14 |
| 65 [default = IMPORTS]; |
57 } | 66 } |
58 | 67 |
59 message ServiceWorkerResourceRecord { | 68 message ServiceWorkerResourceRecord { |
60 required int64 resource_id = 1; | 69 required int64 resource_id = 1; |
61 required string url = 2; | 70 required string url = 2; |
62 optional uint64 size_bytes = 3; | 71 optional uint64 size_bytes = 3; |
63 } | 72 } |
OLD | NEW |